@7365admin1/layer-common 1.11.0 → 1.11.2
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 1.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ed37627: Update Fix for Bulletin Board issue
|
|
8
|
+
|
|
9
|
+
## 1.11.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cce0f12: Update for release of Dashboard changes
|
|
14
|
+
|
|
3
15
|
## 1.11.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -259,16 +259,17 @@ function validStartDateRule(value: string) {
|
|
|
259
259
|
return true;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
function validExpiryDateRule(
|
|
262
|
+
function validExpiryDateRule() {
|
|
263
263
|
const noExpiration = bulletinForm.noExpiration
|
|
264
264
|
if (noExpiration) return true;
|
|
265
265
|
const startDateISO = bulletinForm.startDate;
|
|
266
|
-
|
|
266
|
+
const endDateISO = bulletinForm.endDate;
|
|
267
|
+
if (!endDateISO) {
|
|
267
268
|
return 'End Date is required';
|
|
268
269
|
}
|
|
269
270
|
|
|
270
|
-
if (
|
|
271
|
-
const expiry = new Date(
|
|
271
|
+
if (endDateISO && startDateISO) {
|
|
272
|
+
const expiry = new Date(endDateISO);
|
|
272
273
|
const start = new Date(startDateISO as string);
|
|
273
274
|
return expiry >= start || 'End date must be equal or later than start date';
|
|
274
275
|
}
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
</v-row>
|
|
61
61
|
</template>
|
|
62
62
|
<script setup lang="ts">
|
|
63
|
+
import useBulletin from '../composables/useBulletin';
|
|
63
64
|
import { APP_CONSTANTS } from '../constants/app';
|
|
64
65
|
|
|
65
66
|
definePageMeta({
|
|
@@ -173,7 +174,7 @@ const {
|
|
|
173
174
|
pending: getAnnouncementPending,
|
|
174
175
|
} = await useLazyAsyncData(
|
|
175
176
|
`get-all-announcements-${page.value}`,
|
|
176
|
-
() => getAll({ page: page.value, site: siteId, status: status.value, recipients: props.recipients }),
|
|
177
|
+
() => getAll({ page: page.value, site: siteId, status: status.value, recipients: props.recipients ?? "" }),
|
|
177
178
|
{
|
|
178
179
|
watch: [page, () => route.query],
|
|
179
180
|
}
|
|
@@ -622,15 +622,16 @@ function validStartDateRule(value: string) {
|
|
|
622
622
|
return true;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
function validExpiryDateRule(
|
|
625
|
+
function validExpiryDateRule() {
|
|
626
626
|
const startDateISO = vehicle.start;
|
|
627
|
+
const endDateISO = vehicle.end;
|
|
627
628
|
|
|
628
|
-
if (!
|
|
629
|
+
if (!endDateISO && startDateISO) {
|
|
629
630
|
return 'Expiry Date is required';
|
|
630
631
|
}
|
|
631
632
|
|
|
632
|
-
if (
|
|
633
|
-
const expiry = new Date(
|
|
633
|
+
if (endDateISO && startDateISO) {
|
|
634
|
+
const expiry = new Date(endDateISO);
|
|
634
635
|
const start = new Date(startDateISO as string);
|
|
635
636
|
return expiry > start || 'Expiry date must be later than start date';
|
|
636
637
|
}
|
|
@@ -31,7 +31,7 @@ export default function(){
|
|
|
31
31
|
type TGetAllParams = {
|
|
32
32
|
page?: number;
|
|
33
33
|
limit?: number;
|
|
34
|
-
|
|
34
|
+
order?: 'asc' | 'desc';
|
|
35
35
|
site?: string;
|
|
36
36
|
status?: TAnnouncementStatus;
|
|
37
37
|
search?: string;
|
|
@@ -41,7 +41,7 @@ export default function(){
|
|
|
41
41
|
async function getAll({
|
|
42
42
|
page = 1,
|
|
43
43
|
limit = 10,
|
|
44
|
-
|
|
44
|
+
order = "desc",
|
|
45
45
|
site,
|
|
46
46
|
status,
|
|
47
47
|
search,
|
|
@@ -54,7 +54,7 @@ export default function(){
|
|
|
54
54
|
query: {
|
|
55
55
|
page,
|
|
56
56
|
limit,
|
|
57
|
-
|
|
57
|
+
order,
|
|
58
58
|
site,
|
|
59
59
|
status,
|
|
60
60
|
search,
|
package/package.json
CHANGED