Skip to content

Commit a72ffd1

Browse files
authored
Merge pull request #3135 from uw-it-aca/qa
Qa
2 parents 186d28b + d1fda52 commit a72ffd1

File tree

5 files changed

+75
-26
lines changed

5 files changed

+75
-26
lines changed

myuw_vue/components/accounts/tuition-fees.vue

+49-24
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
<h2 class="h4 mb-3 text-dark-beige myuw-font-encode-sans">Tuition &amp; Fees</h2>
1010
</template>
1111
<template #card-body>
12-
<div style="text-align: center">
12+
<div>
13+
<div v-if="hasIacData" role="alert" class="alert alert-warning myuw-text-md">
14+
<strong>Digital material fees are not included in tuition</strong>, they must be paid
15+
separately below under "UW Day One Access Fees."
16+
</div>
1317
<div
1418
v-if="hasTuitionDate && tuitionDateFromNow === 'Today' && tuiBalance > 0"
15-
class="alert alert-danger text-danger"
19+
class="alert alert-danger text-danger" style="text-align: center"
1620
role="alert"
1721
>
1822
<font-awesome-icon :icon="faExclamationTriangle" /> Tuition and fees are due today.
@@ -41,14 +45,16 @@
4145
<div class="flex-fill w-50">Student Fiscal Services</div>
4246
<div class="flex-fill w-50 text-end">
4347
<a href="https://sdb.admin.uw.edu/sisStudents/uwnetid/tuition.aspx"
44-
>Tuition Statement</a>
48+
>Tuition Statement</a
49+
>
4550
</div>
4651
</div>
4752
<div v-if="tuiBalance != 0" class="text-end">
4853
<uw-link-button
4954
v-out="'Make tuition payment'"
5055
href="http://f2.washington.edu/fm/sfs/tuition/payment"
51-
>Make payment</uw-link-button>
56+
>Make payment</uw-link-button
57+
>
5258
</div>
5359
</template>
5460
</uw-card-status>
@@ -64,7 +70,8 @@
6470
<div class="flex-fill w-50 text-end">
6571
No payment needed<br />
6672
<a href="https://sdb.admin.uw.edu/sisStudents/uwnetid/tuition.aspx"
67-
>Tuition Statement</a>
73+
>Tuition Statement</a
74+
>
6875
</div>
6976
</div>
7077
</template>
@@ -84,7 +91,8 @@
8491
<uw-link-button
8592
v-out="'Make Continuum College tuition payment'"
8693
href="http://portal.continuum.uw.edu"
87-
>Make payment</uw-link-button>
94+
>Make payment</uw-link-button
95+
>
8896
</div>
8997
</div>
9098
</template>
@@ -103,7 +111,8 @@
103111
v-out="'Continuum College Account Statement'"
104112
href="http://portal.continuum.uw.edu"
105113
class="myuw-text-md"
106-
>Account Statement</a>
114+
>Account Statement</a
115+
>
107116
</div>
108117
</div>
109118
</template>
@@ -129,17 +138,24 @@
129138
<div class="alert alert-warning myuw-text-md" role="alert">
130139
<p>
131140
One or more of your enrolled courses provides you access to
132-
<a :href="textbooksUrl">required digital materials</a>,
133-
in Canvas, on or before the first day of class.
141+
<a :href="textbooksUrl">required digital materials</a>, in Canvas, on or before the
142+
first day of class.
134143
</p>
135144
<p class="mb-0">
136-
<strong>To maintain access to these materials at Day One Access pricing,
137-
you must pay for these materials</strong>.
145+
<strong
146+
>To maintain access to these materials at Day One Access pricing, you must pay for
147+
these materials</strong
148+
>.
138149
<a href="https://www.ubookstore.com/day-one-access-faq"
139-
>About the Day One Access Program</a>.
150+
>About the Day One Access Program</a
151+
>.
140152
</p>
141153
</div>
142-
<uw-card-status>
154+
<div v-if="dayOneAccessOverDue" role="alert" class="alert alert-danger myuw-text-md">
155+
<strong>The payment deadline has passed.</strong> To learn about your options, please
156+
email <a href="mailto:[email protected]">[email protected]</a>.
157+
</div>
158+
<uw-card-status v-else>
143159
<template #status-label>Amount Due</template>
144160
<template v-if="iacData.balance > 0" #status-value>
145161
<span class="text-danger">${{ iacData.balance.toFixed(2) }}</span>
@@ -153,14 +169,15 @@
153169
<uw-link-button
154170
v-out="'Make bookstore payment'"
155171
:href="iacData.bookstore_checkout_url"
156-
>Make payment</uw-link-button>
172+
>Make payment</uw-link-button
173+
>
157174
</div>
158175
</div>
159176
</template>
160177
</uw-card-status>
161178
</li>
162179

163-
<li v-if="hasIacData && iacData.balance > 0 && Boolean(iacData.payment_due_day)">
180+
<li v-if="hasIacData && iacData.balance > 0 && !dayOneAccessOverDue">
164181
<uw-card-status>
165182
<template #status-label>Payment Due</template>
166183
<template #status-value>
@@ -180,7 +197,8 @@
180197
<a
181198
v-out="'Give Tuition Account Access'"
182199
href="https://sdb.admin.uw.edu/sisStudents/uwnetid/release.aspx"
183-
>Give access to your tuition account and financial aid information</a>
200+
>Give access to your tuition account and financial aid information</a
201+
>
184202
to parents or other third parties.
185203
</p>
186204
<p v-for="(msg, i) in pceTuitionDup" :key="i">
@@ -195,7 +213,8 @@
195213
<a
196214
href="https://sdb.admin.uw.edu/sisStudents/uwnetid/finaidstatus.aspx"
197215
class="myuw-text-md"
198-
>Financial Aid Status</a>
216+
>Financial Aid Status</a
217+
>
199218
</li>
200219
</ul>
201220
</template>
@@ -209,11 +228,15 @@
209228
<a
210229
v-out="'Tuition Statement'"
211230
href="https://sdb.admin.uw.edu/sisStudents/uwnetid/tuition.aspx"
212-
>Tuition Statement</a> page.
231+
>Tuition Statement</a
232+
>
233+
page.
213234
</span>
214235
<span v-else>
215236
<a v-out="'Continuum College Tuition portal'" href="https://portal.continuum.uw.edu"
216-
>PCE Tuition</a> portal.
237+
>PCE Tuition</a
238+
>
239+
portal.
217240
</span>
218241
</template>
219242
<template #card-error-extra>
@@ -344,18 +367,20 @@ export default {
344367
},
345368
hasIacData() {
346369
// MUWM-5272
347-
return (
348-
(this.seaStud || this.botStud) && this.iacData &&
349-
this.iacData.bookstore_checkout_url);
370+
return (this.seaStud || this.botStud) && this.iacData && this.iacData.bookstore_checkout_url;
350371
},
351372
dayOneAccessDueDateFromNow() {
352373
// MUWM-5272
353374
return this.toFromNowDate(this.iacData.payment_due_day);
354375
},
376+
dayOneAccessOverDue() {
377+
// MUWM-5351
378+
return this.hasPassed(this.iacData.payment_due_day);
379+
},
355380
textbooksUrl() {
356381
// MUWM-5272
357-
return "/textbooks/" + this.iacData.year + ',' + this.iacData.quarter;
358-
}
382+
return '/textbooks/' + this.iacData.year + ',' + this.iacData.quarter;
383+
},
359384
},
360385
created() {
361386
if (this.isStudent) {

myuw_vue/mixins/utils.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,22 @@ export default {
131131
pageTitle[0] = term;
132132
return pageTitle.map((s) => this.capitalizeString(s)).join(' ');
133133
},
134+
135+
hasPassed(dateStr, useCompDate = true) {
136+
if (!dateStr) return false;
137+
138+
dayjs.tz.setDefault("America/Los_Angeles");
139+
const dt = dayjs(dateStr);
140+
141+
if (useCompDate && this.cardDisplayDates?.comparison_date) {
142+
return dayjs(this.cardDisplayDates.comparison_date).isAfter(dt);
143+
}
144+
145+
return dayjs().isAfter(dt);
146+
},
147+
134148
nowDatetime(useCompDate = true) {
135-
if (useCompDate && this.cardDisplayDates && this.cardDisplayDates.comparison_date) {
149+
if (useCompDate && this.cardDisplayDates?.comparison_date) {
136150
return dayjs(this.cardDisplayDates.comparison_date);
137151
}
138152
// dayjs.tz.setDefault("America/Los_Angeles");

myuw_vue/tests/mixins.test.js

+10
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ describe('mixins', () => {
140140
.toEqual('in 4 days');
141141
});
142142

143+
it('hasPassed', async () => {
144+
expect(utils.methods.hasPassed()).toEqual(false);
145+
expect(utils.methods.hasPassed('')).toEqual(false);
146+
const now = utils.methods.dayjs();
147+
expect(utils.methods.hasPassed(now.subtract(1, 'd').toISOString(), false))
148+
.toEqual(true);
149+
expect(utils.methods.hasPassed(now.add(1, 'd').toISOString(), false))
150+
.toEqual(false);
151+
});
152+
143153
it('formatPhoneNumberLink', () => {
144154
expect(utils.methods.formatPhoneNumberLink("+1 206 543-0000")).toEqual('+1-206-543-0000');
145155
expect(utils.methods.formatPhoneNumberLink("425-666-6666")).toEqual('+1-425-666-6666');

myuw_vue/tests/tuition.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ describe('Tuition store', () => {
120120
expect(wrapper.findAllComponents(CardStatus).length).toBe(5);
121121
expect(wrapper.vm.hasIacData).toBeTruthy;
122122
expect(wrapper.vm.dayOneAccessDueDateFromNow).toBeTruthy;
123+
expect(wrapper.vm.dayOneAccessOverDue).toBe(false);
123124
});
124125

125126
it('Evaluate the computed properties of jpce', async () => {

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"babel-loader": "8.2.2",
1313
"bootstrap": "5.1.0",
1414
"browserslist": "4.16.6",
15-
"canvas": "2.11.2",
1615
"clean-webpack-plugin": "4.0.0",
1716
"core-js": "3.35.1",
1817
"css-loader": "5.2.7",

0 commit comments

Comments
 (0)