|
1 | 1 | <template> |
2 | 2 | <div> |
3 | | - <div class="mt-2 ml-1 d-flex"> |
4 | | - <v-switch v-model="isLMDA" class="my-0 mr-2" @change="toggleEligibility('LMDA')"> </v-switch> |
5 | | - <h3 class="text-h6 font-weight-regular">LMDA Eligible</h3> |
6 | | - <v-switch v-model="isWDA" class="my-0 ml-10 mr-2" @change="toggleEligibility('WDA')"> </v-switch> |
7 | | - <h3 class="text-h6 font-weight-regular">WDA Eligible</h3> |
8 | | - </div> |
9 | | - <div> |
10 | | - <div v-if="fundingRequest && fundingRequest.json_data"> |
11 | | - <v-card class="default mb-8"> |
12 | | - <v-card-text> |
13 | | - <div> |
14 | | - <v-menu |
15 | | - v-model="dateMenu1" |
16 | | - :close-on-content-click="false" |
17 | | - transition="scale-transition" |
18 | | - left |
19 | | - nudge-top="26" |
20 | | - offset-y |
21 | | - min-width="auto" |
22 | | - > |
23 | | - <template v-slot:activator="{ on, attrs }"> |
24 | | - <v-text-field |
25 | | - :value="fundingRequest.json_data.expected_last_day_of_working?.slice(0, 10)" |
26 | | - label="Expected last day of work" |
27 | | - append-icon="mdi-calendar" |
28 | | - readonly |
29 | | - outlined |
30 | | - dense |
31 | | - background-color="white" |
32 | | - v-bind="attrs" |
33 | | - v-on="on" |
34 | | - ></v-text-field> |
35 | | - </template> |
36 | | - <v-date-picker |
| 3 | + <div v-if="fundingRequest && fundingRequest.json_data"> |
| 4 | + <div class="mt-2 ml-1 d-flex"> |
| 5 | + <v-switch v-model="isLMDA" class="my-0 mr-2" @change="toggleEligibility('LMDA')"> </v-switch> |
| 6 | + <h3 class="text-h6 font-weight-regular">LMDA Eligible</h3> |
| 7 | + <v-switch v-model="isWDA" class="my-0 ml-10 mr-2" @change="toggleEligibility('WDA')"> </v-switch> |
| 8 | + <h3 class="text-h6 font-weight-regular">WDA Eligible</h3> |
| 9 | + </div> |
| 10 | + <v-card class="default mb-8"> |
| 11 | + <v-card-text> |
| 12 | + <div> |
| 13 | + <v-menu |
| 14 | + v-model="dateMenu1" |
| 15 | + :close-on-content-click="false" |
| 16 | + transition="scale-transition" |
| 17 | + left |
| 18 | + nudge-top="26" |
| 19 | + offset-y |
| 20 | + min-width="auto" |
| 21 | + > |
| 22 | + <template v-slot:activator="{ on, attrs }"> |
| 23 | + <v-text-field |
37 | 24 | :value="fundingRequest.json_data.expected_last_day_of_working?.slice(0, 10)" |
38 | | - @input=" |
39 | | - (e) => { |
40 | | - fundingRequest.json_data.expected_last_day_of_working = e; |
41 | | - dateMenu1 = false; |
42 | | - saveItem(); |
43 | | - } |
44 | | - " |
45 | | - ></v-date-picker> |
46 | | - </v-menu> |
47 | | - |
48 | | - <v-divider class="mb-8 mt-1" /> |
49 | | - |
50 | | - <v-row v-for="line of fundingRequest.json_data.ei_eligibility_list"> |
51 | | - <v-col cols="12" md="5"> |
52 | | - <v-select |
53 | | - :items="['Yes', 'No']" |
54 | | - label="EI Eligibility" |
55 | | - v-model="line.eligible_for_ei" |
56 | | - dense |
57 | | - outlined |
58 | | - hide-details |
59 | | - background-color="white" |
60 | | - @change="saveItem" |
61 | | - /> |
62 | | - </v-col> |
63 | | - <v-col cols="12" md="5"> |
64 | | - <v-menu |
65 | | - v-model="line.dateMenu" |
66 | | - :close-on-content-click="false" |
67 | | - transition="scale-transition" |
68 | | - left |
69 | | - nudge-top="26" |
70 | | - offset-y |
71 | | - min-width="auto" |
72 | | - > |
73 | | - <template v-slot:activator="{ on, attrs }"> |
74 | | - <v-text-field |
75 | | - :value="line.date_checked?.slice(0, 10)" |
76 | | - label="Date checked" |
77 | | - append-icon="mdi-calendar" |
78 | | - readonly |
79 | | - hide-details |
80 | | - outlined |
81 | | - dense |
82 | | - background-color="white" |
83 | | - v-bind="attrs" |
84 | | - v-on="on" |
85 | | - ></v-text-field> |
86 | | - </template> |
87 | | - <v-date-picker |
| 25 | + label="Expected last day of work" |
| 26 | + append-icon="mdi-calendar" |
| 27 | + readonly |
| 28 | + outlined |
| 29 | + dense |
| 30 | + background-color="white" |
| 31 | + v-bind="attrs" |
| 32 | + v-on="on" |
| 33 | + ></v-text-field> |
| 34 | + </template> |
| 35 | + <v-date-picker |
| 36 | + :value="fundingRequest.json_data.expected_last_day_of_working?.slice(0, 10)" |
| 37 | + @input=" |
| 38 | + (e) => { |
| 39 | + fundingRequest.json_data.expected_last_day_of_working = e; |
| 40 | + dateMenu1 = false; |
| 41 | + saveItem(); |
| 42 | + } |
| 43 | + " |
| 44 | + ></v-date-picker> |
| 45 | + </v-menu> |
| 46 | + |
| 47 | + <v-divider class="mb-8 mt-1" /> |
| 48 | + |
| 49 | + <v-row v-for="line of fundingRequest.json_data.ei_eligibility_list"> |
| 50 | + <v-col cols="12" md="5"> |
| 51 | + <v-select |
| 52 | + :items="['Yes', 'No']" |
| 53 | + label="EI Eligibility" |
| 54 | + v-model="line.eligible_for_ei" |
| 55 | + dense |
| 56 | + outlined |
| 57 | + hide-details |
| 58 | + background-color="white" |
| 59 | + @change="saveItem" |
| 60 | + /> |
| 61 | + </v-col> |
| 62 | + <v-col cols="12" md="5"> |
| 63 | + <v-menu |
| 64 | + v-model="line.dateMenu" |
| 65 | + :close-on-content-click="false" |
| 66 | + transition="scale-transition" |
| 67 | + left |
| 68 | + nudge-top="26" |
| 69 | + offset-y |
| 70 | + min-width="auto" |
| 71 | + > |
| 72 | + <template v-slot:activator="{ on, attrs }"> |
| 73 | + <v-text-field |
88 | 74 | :value="line.date_checked?.slice(0, 10)" |
89 | | - @input=" |
90 | | - (e) => { |
91 | | - line.date_checked = e; |
92 | | - line.dateMenu = false; |
93 | | - saveItem(); |
94 | | - } |
95 | | - " |
96 | | - ></v-date-picker> |
97 | | - </v-menu> |
98 | | - </v-col> |
99 | | - <v-col cols="12" md="2" class="text-right"> |
100 | | - <v-btn @click="removeEIEligibility(line)" icon color="warning"><v-icon>mdi-delete</v-icon></v-btn> |
101 | | - </v-col> |
102 | | - </v-row> |
103 | | - |
104 | | - <v-btn class="my-5" color="info" @click="addEIEligibility">Add</v-btn> |
105 | | - </div> |
106 | | - |
107 | | - <p>If apprentice is not applying for EI, document the reason below</p> |
108 | | - <v-textarea |
109 | | - label="Comments" |
110 | | - rows="3" |
111 | | - auto-grow |
112 | | - v-model="fundingRequest.json_data.notes" |
113 | | - dense |
114 | | - outlined |
115 | | - hide-details |
116 | | - background-color="white" |
117 | | - @blur="saveItem" |
118 | | - /> |
119 | | - </v-card-text> |
120 | | - </v-card> |
121 | | - </div> |
| 75 | + label="Date checked" |
| 76 | + append-icon="mdi-calendar" |
| 77 | + readonly |
| 78 | + hide-details |
| 79 | + outlined |
| 80 | + dense |
| 81 | + background-color="white" |
| 82 | + v-bind="attrs" |
| 83 | + v-on="on" |
| 84 | + ></v-text-field> |
| 85 | + </template> |
| 86 | + <v-date-picker |
| 87 | + :value="line.date_checked?.slice(0, 10)" |
| 88 | + @input=" |
| 89 | + (e) => { |
| 90 | + line.date_checked = e; |
| 91 | + line.dateMenu = false; |
| 92 | + saveItem(); |
| 93 | + } |
| 94 | + " |
| 95 | + ></v-date-picker> |
| 96 | + </v-menu> |
| 97 | + </v-col> |
| 98 | + <v-col cols="12" md="2" class="text-right"> |
| 99 | + <v-btn @click="removeEIEligibility(line)" icon color="warning"><v-icon>mdi-delete</v-icon></v-btn> |
| 100 | + </v-col> |
| 101 | + </v-row> |
| 102 | + |
| 103 | + <v-btn class="my-5" color="info" @click="addEIEligibility">Add</v-btn> |
| 104 | + </div> |
| 105 | + |
| 106 | + <p>If apprentice is not applying for EI, document the reason below</p> |
| 107 | + <v-textarea |
| 108 | + label="Comments" |
| 109 | + rows="3" |
| 110 | + auto-grow |
| 111 | + v-model="fundingRequest.json_data.notes" |
| 112 | + dense |
| 113 | + outlined |
| 114 | + hide-details |
| 115 | + background-color="white" |
| 116 | + @blur="saveItem" |
| 117 | + /> |
| 118 | + </v-card-text> |
| 119 | + </v-card> |
| 120 | + </div> |
| 121 | + <div v-else class="mx-5"> |
| 122 | + Either the Skills for Success or Apprenticeship Training funding request must be created first |
122 | 123 | </div> |
123 | 124 |
|
124 | 125 | <confirm-dialog ref="confirm"></confirm-dialog> |
@@ -154,16 +155,18 @@ export default { |
154 | 155 | const myRequest = this.application?.funding_requests?.find((fr) => wupRequestTypes.includes(fr.request_type_id)); |
155 | 156 | this.hasFundingRequest = !!myRequest; |
156 | 157 |
|
157 | | - if (myRequest && !myRequest.json_data.funding_source) { |
158 | | - this.isLMDA = false; |
159 | | - this.isWDA = false; |
160 | | - } else { |
161 | | - if (myRequest.json_data.funding_source === "WDA") { |
162 | | - this.isWDA = true; |
| 158 | + if (myRequest) { |
| 159 | + if (myRequest && !myRequest.json_data.funding_source) { |
163 | 160 | this.isLMDA = false; |
164 | | - } else { |
165 | | - this.isLMDA = true; |
166 | 161 | this.isWDA = false; |
| 162 | + } else { |
| 163 | + if (myRequest.json_data.funding_source === "WDA") { |
| 164 | + this.isWDA = true; |
| 165 | + this.isLMDA = false; |
| 166 | + } else { |
| 167 | + this.isLMDA = true; |
| 168 | + this.isWDA = false; |
| 169 | + } |
167 | 170 | } |
168 | 171 | } |
169 | 172 |
|
|
0 commit comments