@goweekdays/layer-common 1.5.12 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/PRIVACY_POLICY_JOBS.md +180 -0
- package/components/ContentEditor.client.vue +100 -0
- package/composables/useJobPost.ts +0 -110
- package/composables/useJobProfile.ts +385 -0
- package/composables/useOption.ts +126 -0
- package/composables/useUtils.ts +77 -0
- package/package.json +8 -2
- package/pages/privacy-policy-jobs.vue +368 -0
- package/plugins/vuetify.ts +8 -0
- package/types/job.profile.d.ts +137 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
export function useJobProfile() {
|
|
2
|
+
const jobProfile = ref<TJobProfile>({
|
|
3
|
+
_id: "",
|
|
4
|
+
user: "",
|
|
5
|
+
firstName: "",
|
|
6
|
+
lastName: "",
|
|
7
|
+
headline: "",
|
|
8
|
+
email: "",
|
|
9
|
+
contact: "",
|
|
10
|
+
country: "",
|
|
11
|
+
city: "",
|
|
12
|
+
streetAddress: "",
|
|
13
|
+
postalCode: "",
|
|
14
|
+
relocate: false,
|
|
15
|
+
showContact: false,
|
|
16
|
+
summary: "",
|
|
17
|
+
workExperience: [],
|
|
18
|
+
education: [],
|
|
19
|
+
skills: [],
|
|
20
|
+
certifications: [],
|
|
21
|
+
languages: [],
|
|
22
|
+
militaryExperience: {
|
|
23
|
+
country: "",
|
|
24
|
+
branch: "",
|
|
25
|
+
rank: "",
|
|
26
|
+
serving: false,
|
|
27
|
+
fromMonth: "",
|
|
28
|
+
fromYear: "",
|
|
29
|
+
},
|
|
30
|
+
patents: [],
|
|
31
|
+
publications: [],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
function add(value: TJobProfile) {
|
|
35
|
+
return useNuxtApp().$api<TJobProfile>(`/api/job/profiles`, {
|
|
36
|
+
method: "POST",
|
|
37
|
+
body: value,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function getAll({ page = 1, limit = 50, status = "new", search = "" } = {}) {
|
|
42
|
+
return useNuxtApp().$api<Record<string, any>>(`/api/job/profiles`, {
|
|
43
|
+
method: "GET",
|
|
44
|
+
query: {
|
|
45
|
+
page,
|
|
46
|
+
limit,
|
|
47
|
+
status,
|
|
48
|
+
search,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getByUser(user: string) {
|
|
54
|
+
return useNuxtApp().$api<TJobProfile>(`/api/job/profiles/user/${user}`, {
|
|
55
|
+
method: "GET",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function updateContactInfoById(
|
|
60
|
+
id: string,
|
|
61
|
+
options: {
|
|
62
|
+
firstName?: string;
|
|
63
|
+
lastName?: string;
|
|
64
|
+
headline?: string;
|
|
65
|
+
contact?: string;
|
|
66
|
+
showContact?: boolean;
|
|
67
|
+
country?: string;
|
|
68
|
+
city?: string;
|
|
69
|
+
streetAddress?: string;
|
|
70
|
+
postalCode?: string;
|
|
71
|
+
relocate?: boolean;
|
|
72
|
+
}
|
|
73
|
+
) {
|
|
74
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
75
|
+
`/api/job/profiles/id/${id}/contact-info`,
|
|
76
|
+
{
|
|
77
|
+
method: "PATCH",
|
|
78
|
+
body: options,
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function updateSummaryById(id: string, summary: string) {
|
|
84
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
85
|
+
`/api/job/profiles/id/${id}/summary`,
|
|
86
|
+
{
|
|
87
|
+
method: "PATCH",
|
|
88
|
+
body: { summary },
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function updatePersonalInfoById(
|
|
94
|
+
id: string,
|
|
95
|
+
options: {
|
|
96
|
+
citizenship?: string;
|
|
97
|
+
}
|
|
98
|
+
) {
|
|
99
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
100
|
+
`/api/job/profiles/id/${id}/personal-info`,
|
|
101
|
+
{
|
|
102
|
+
method: "PATCH",
|
|
103
|
+
body: options,
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function addWorkExpById(
|
|
109
|
+
id: string,
|
|
110
|
+
options: Pick<
|
|
111
|
+
TJobProfileWorkExp,
|
|
112
|
+
| "jobTitle"
|
|
113
|
+
| "company"
|
|
114
|
+
| "country"
|
|
115
|
+
| "city"
|
|
116
|
+
| "fromMonth"
|
|
117
|
+
| "fromYear"
|
|
118
|
+
| "toMonth"
|
|
119
|
+
| "toYear"
|
|
120
|
+
| "currentlyWorking"
|
|
121
|
+
| "description"
|
|
122
|
+
| "additionalDetails"
|
|
123
|
+
>
|
|
124
|
+
) {
|
|
125
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
126
|
+
`/api/job/profiles/id/${id}/work-experience`,
|
|
127
|
+
{
|
|
128
|
+
method: "POST",
|
|
129
|
+
body: options,
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function updateWorkExpById(
|
|
135
|
+
id: string,
|
|
136
|
+
options: Pick<
|
|
137
|
+
TJobProfileWorkExp,
|
|
138
|
+
| "id"
|
|
139
|
+
| "jobTitle"
|
|
140
|
+
| "company"
|
|
141
|
+
| "country"
|
|
142
|
+
| "city"
|
|
143
|
+
| "fromMonth"
|
|
144
|
+
| "fromYear"
|
|
145
|
+
| "toMonth"
|
|
146
|
+
| "toYear"
|
|
147
|
+
| "currentlyWorking"
|
|
148
|
+
| "description"
|
|
149
|
+
| "additionalDetails"
|
|
150
|
+
>
|
|
151
|
+
) {
|
|
152
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
153
|
+
`/api/job/profiles/id/${id}/work-experience`,
|
|
154
|
+
{
|
|
155
|
+
method: "PATCH",
|
|
156
|
+
body: options,
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function deleteWorkExpById(id: string, workExpId: string) {
|
|
162
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
163
|
+
`/api/job/profiles/id/${id}/work-experience/${workExpId}`,
|
|
164
|
+
{
|
|
165
|
+
method: "DELETE",
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function addEduById(
|
|
171
|
+
id: string,
|
|
172
|
+
options: Pick<
|
|
173
|
+
TJobProfileEdu,
|
|
174
|
+
| "levelOfEducation"
|
|
175
|
+
| "fieldOfStudy"
|
|
176
|
+
| "schoolName"
|
|
177
|
+
| "country"
|
|
178
|
+
| "location"
|
|
179
|
+
| "currentlyEnrolled"
|
|
180
|
+
| "fromMonth"
|
|
181
|
+
| "fromYear"
|
|
182
|
+
| "toMonth"
|
|
183
|
+
| "toYear"
|
|
184
|
+
| "additionalInfo"
|
|
185
|
+
>
|
|
186
|
+
) {
|
|
187
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
188
|
+
`/api/job/profiles/id/${id}/education`,
|
|
189
|
+
{
|
|
190
|
+
method: "POST",
|
|
191
|
+
body: options,
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function updateEduById(
|
|
197
|
+
id: string,
|
|
198
|
+
options: Pick<
|
|
199
|
+
TJobProfileEdu,
|
|
200
|
+
| "id"
|
|
201
|
+
| "levelOfEducation"
|
|
202
|
+
| "fieldOfStudy"
|
|
203
|
+
| "schoolName"
|
|
204
|
+
| "country"
|
|
205
|
+
| "location"
|
|
206
|
+
| "currentlyEnrolled"
|
|
207
|
+
| "fromMonth"
|
|
208
|
+
| "fromYear"
|
|
209
|
+
| "toMonth"
|
|
210
|
+
| "toYear"
|
|
211
|
+
| "additionalInfo"
|
|
212
|
+
>
|
|
213
|
+
) {
|
|
214
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
215
|
+
`/api/job/profiles/id/${id}/education`,
|
|
216
|
+
{
|
|
217
|
+
method: "PATCH",
|
|
218
|
+
body: options,
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function deleteEduById(id: string, eduId: string) {
|
|
224
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
225
|
+
`/api/job/profiles/id/${id}/education/${eduId}`,
|
|
226
|
+
{
|
|
227
|
+
method: "DELETE",
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function addSkillById(
|
|
233
|
+
id: string,
|
|
234
|
+
options: Pick<TJobProfileSkill, "name" | "proficiency">
|
|
235
|
+
) {
|
|
236
|
+
return useNuxtApp().$api<TJobProfile>(`/api/job/profiles/id/${id}/skills`, {
|
|
237
|
+
method: "POST",
|
|
238
|
+
body: options,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function updateSkillById(
|
|
243
|
+
id: string,
|
|
244
|
+
options: Pick<TJobProfileSkill, "id" | "name" | "proficiency">
|
|
245
|
+
) {
|
|
246
|
+
return useNuxtApp().$api<TJobProfile>(`/api/job/profiles/id/${id}/skills`, {
|
|
247
|
+
method: "PATCH",
|
|
248
|
+
body: options,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function deleteSkillById(id: string, skillId: string) {
|
|
253
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
254
|
+
`/api/job/profiles/id/${id}/skills/${skillId}`,
|
|
255
|
+
{
|
|
256
|
+
method: "DELETE",
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function updateAdditionalInfoById(id: string, additionalInfo: string) {
|
|
262
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
263
|
+
`/api/job/profiles/id/${id}/additional-info`,
|
|
264
|
+
{
|
|
265
|
+
method: "PATCH",
|
|
266
|
+
body: { additionalInfo },
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function addLangById(
|
|
272
|
+
id: string,
|
|
273
|
+
options: Pick<TJobProfileLang, "language" | "proficiency">
|
|
274
|
+
) {
|
|
275
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
276
|
+
`/api/job/profiles/id/${id}/languages`,
|
|
277
|
+
{
|
|
278
|
+
method: "POST",
|
|
279
|
+
body: options,
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function updateLangById(
|
|
285
|
+
id: string,
|
|
286
|
+
options: Pick<TJobProfileLang, "id" | "language" | "proficiency">
|
|
287
|
+
) {
|
|
288
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
289
|
+
`/api/job/profiles/id/${id}/languages`,
|
|
290
|
+
{
|
|
291
|
+
method: "PATCH",
|
|
292
|
+
body: options,
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function deleteLangById(id: string, langId: string) {
|
|
298
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
299
|
+
`/api/job/profiles/id/${id}/languages/${langId}`,
|
|
300
|
+
{
|
|
301
|
+
method: "DELETE",
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function addCertById(
|
|
307
|
+
id: string,
|
|
308
|
+
options: Pick<
|
|
309
|
+
TJobProfileCert,
|
|
310
|
+
| "title"
|
|
311
|
+
| "noExpiry"
|
|
312
|
+
| "fromMonth"
|
|
313
|
+
| "fromYear"
|
|
314
|
+
| "toMonth"
|
|
315
|
+
| "toYear"
|
|
316
|
+
| "description"
|
|
317
|
+
>
|
|
318
|
+
) {
|
|
319
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
320
|
+
`/api/job/profiles/id/${id}/certifications`,
|
|
321
|
+
{
|
|
322
|
+
method: "POST",
|
|
323
|
+
body: options,
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function updateCertById(
|
|
329
|
+
id: string,
|
|
330
|
+
options: Pick<
|
|
331
|
+
TJobProfileCert,
|
|
332
|
+
| "id"
|
|
333
|
+
| "title"
|
|
334
|
+
| "noExpiry"
|
|
335
|
+
| "fromMonth"
|
|
336
|
+
| "fromYear"
|
|
337
|
+
| "toMonth"
|
|
338
|
+
| "toYear"
|
|
339
|
+
| "description"
|
|
340
|
+
>
|
|
341
|
+
) {
|
|
342
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
343
|
+
`/api/job/profiles/id/${id}/certifications`,
|
|
344
|
+
{
|
|
345
|
+
method: "PATCH",
|
|
346
|
+
body: options,
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function deleteCertById(id: string, certId: string) {
|
|
352
|
+
return useNuxtApp().$api<TJobProfile>(
|
|
353
|
+
`/api/job/profiles/id/${id}/certifications/${certId}`,
|
|
354
|
+
{
|
|
355
|
+
method: "DELETE",
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
jobProfile,
|
|
362
|
+
add,
|
|
363
|
+
getAll,
|
|
364
|
+
getByUser,
|
|
365
|
+
updateContactInfoById,
|
|
366
|
+
updateSummaryById,
|
|
367
|
+
updatePersonalInfoById,
|
|
368
|
+
addWorkExpById,
|
|
369
|
+
updateWorkExpById,
|
|
370
|
+
deleteWorkExpById,
|
|
371
|
+
addEduById,
|
|
372
|
+
updateEduById,
|
|
373
|
+
deleteEduById,
|
|
374
|
+
addSkillById,
|
|
375
|
+
updateSkillById,
|
|
376
|
+
deleteSkillById,
|
|
377
|
+
updateAdditionalInfoById,
|
|
378
|
+
addLangById,
|
|
379
|
+
updateLangById,
|
|
380
|
+
deleteLangById,
|
|
381
|
+
addCertById,
|
|
382
|
+
updateCertById,
|
|
383
|
+
deleteCertById,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export default function useOption() {
|
|
2
|
+
function getCountries({ page = 1, limit = 10, search = "" } = {}) {
|
|
3
|
+
return useNuxtApp().$api<Record<string, any>>(`/api/options/countries`, {
|
|
4
|
+
method: "GET",
|
|
5
|
+
query: {
|
|
6
|
+
page,
|
|
7
|
+
limit,
|
|
8
|
+
search,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getCities({ page = 1, limit = 10, search = "" } = {}) {
|
|
14
|
+
return useNuxtApp().$api<Record<string, any>>(`/api/options/cities`, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
query: {
|
|
17
|
+
page,
|
|
18
|
+
limit,
|
|
19
|
+
search,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function getJobTitles({ page = 1, limit = 10, search = "" } = {}) {
|
|
25
|
+
return useNuxtApp().$api<Record<string, any>>(`/api/options/job/titles`, {
|
|
26
|
+
method: "GET",
|
|
27
|
+
query: {
|
|
28
|
+
page,
|
|
29
|
+
limit,
|
|
30
|
+
search,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getCurrencies({ page = 1, limit = 10, search = "" } = {}) {
|
|
36
|
+
return useNuxtApp().$api<Record<string, any>>(`/api/options/currencies`, {
|
|
37
|
+
method: "GET",
|
|
38
|
+
query: {
|
|
39
|
+
page,
|
|
40
|
+
limit,
|
|
41
|
+
search,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const defaultCurrencies = [
|
|
47
|
+
{
|
|
48
|
+
title: "PHP",
|
|
49
|
+
value: "PHP",
|
|
50
|
+
prop: {
|
|
51
|
+
subtitle: "Philippines Peso",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "USD",
|
|
56
|
+
value: "USD",
|
|
57
|
+
prop: {
|
|
58
|
+
subtitle: "United States Dollar",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: "EUR",
|
|
63
|
+
value: "EUR",
|
|
64
|
+
prop: {
|
|
65
|
+
subtitle: "Euro",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: "GBP",
|
|
70
|
+
value: "GBP",
|
|
71
|
+
prop: {
|
|
72
|
+
subtitle: "British Pound Sterling",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "JPY",
|
|
77
|
+
value: "JPY",
|
|
78
|
+
prop: {
|
|
79
|
+
subtitle: "Japanese Yen",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: "AUD",
|
|
84
|
+
value: "AUD",
|
|
85
|
+
prop: {
|
|
86
|
+
subtitle: "Australian Dollar",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: "CAD",
|
|
91
|
+
value: "CAD",
|
|
92
|
+
prop: {
|
|
93
|
+
subtitle: "Canadian Dollar",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
title: "CHF",
|
|
98
|
+
value: "CHF",
|
|
99
|
+
prop: {
|
|
100
|
+
subtitle: "Swiss Franc",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: "CNY",
|
|
105
|
+
value: "CNY",
|
|
106
|
+
prop: {
|
|
107
|
+
subtitle: "Chinese Yuan",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: "INR",
|
|
112
|
+
value: "INR",
|
|
113
|
+
prop: {
|
|
114
|
+
subtitle: "Indian Rupee",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
getCountries,
|
|
121
|
+
getCities,
|
|
122
|
+
getJobTitles,
|
|
123
|
+
getCurrencies,
|
|
124
|
+
defaultCurrencies,
|
|
125
|
+
};
|
|
126
|
+
}
|
package/composables/useUtils.ts
CHANGED
|
@@ -451,6 +451,81 @@ export default function useUtils() {
|
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
+
const months = [
|
|
455
|
+
{
|
|
456
|
+
title: "January",
|
|
457
|
+
value: "january",
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
title: "February",
|
|
461
|
+
value: "february",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
title: "March",
|
|
465
|
+
value: "march",
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
title: "April",
|
|
469
|
+
value: "april",
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
title: "May",
|
|
473
|
+
value: "may",
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
title: "June",
|
|
477
|
+
value: "june",
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
title: "July",
|
|
481
|
+
value: "july",
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
title: "August",
|
|
485
|
+
value: "august",
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
title: "September",
|
|
489
|
+
value: "september",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
title: "October",
|
|
493
|
+
value: "october",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
title: "November",
|
|
497
|
+
value: "november",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
title: "December",
|
|
501
|
+
value: "december",
|
|
502
|
+
},
|
|
503
|
+
];
|
|
504
|
+
|
|
505
|
+
function generateYears(
|
|
506
|
+
generation = 0,
|
|
507
|
+
mode = "past",
|
|
508
|
+
currentYear = new Date().getFullYear()
|
|
509
|
+
) {
|
|
510
|
+
const years = [];
|
|
511
|
+
|
|
512
|
+
if (mode === "past") {
|
|
513
|
+
// Generate from current year going back to past years
|
|
514
|
+
for (let i = 0; i <= generation; i++) {
|
|
515
|
+
const year = currentYear - i;
|
|
516
|
+
years.push(year.toString());
|
|
517
|
+
}
|
|
518
|
+
} else if (mode === "future") {
|
|
519
|
+
// Generate from current year going forward to future years
|
|
520
|
+
for (let i = 0; i <= generation; i++) {
|
|
521
|
+
const year = currentYear + i;
|
|
522
|
+
years.push(year.toString());
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return years;
|
|
527
|
+
}
|
|
528
|
+
|
|
454
529
|
return {
|
|
455
530
|
requiredRule,
|
|
456
531
|
emailRule,
|
|
@@ -482,5 +557,7 @@ export default function useUtils() {
|
|
|
482
557
|
requireSlug,
|
|
483
558
|
generatePaymentPromoCode,
|
|
484
559
|
copyToClipboard,
|
|
560
|
+
months,
|
|
561
|
+
generateYears,
|
|
485
562
|
};
|
|
486
563
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@goweekdays/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.6.1",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
"@iconify/vue": "^5.0.0",
|
|
31
31
|
"@mdi/font": "^7.4.47",
|
|
32
32
|
"sass": "^1.80.6",
|
|
33
|
-
"zod": "^3.24.2"
|
|
33
|
+
"zod": "^3.24.2",
|
|
34
|
+
"@tiptap/extension-list": "^3.15.3",
|
|
35
|
+
"@tiptap/extension-text-align": "^3.15.3",
|
|
36
|
+
"@tiptap/extension-text-style": "^3.15.3",
|
|
37
|
+
"@tiptap/pm": "^3.15.3",
|
|
38
|
+
"@tiptap/starter-kit": "^3.15.3",
|
|
39
|
+
"@tiptap/vue-3": "^3.15.3"
|
|
34
40
|
}
|
|
35
41
|
}
|