@7365admin1/layer-common 1.10.6 → 1.10.8

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/components/AccessCardQrTagging.vue +314 -34
  3. package/components/AccessCardQrTaggingPrintQr.vue +75 -0
  4. package/components/{AddSupplyForm.vue → AddEqupmentForm.vue} +5 -5
  5. package/components/AreaChecklistHistoryLogs.vue +9 -0
  6. package/components/BuildingForm.vue +36 -5
  7. package/components/BuildingManagement/buildings.vue +18 -9
  8. package/components/BuildingManagement/units.vue +13 -115
  9. package/components/BuildingUnitFormAdd.vue +42 -33
  10. package/components/BuildingUnitFormEdit.vue +334 -139
  11. package/components/CleaningScheduleMain.vue +60 -13
  12. package/components/Dialog/DeleteConfirmation.vue +2 -2
  13. package/components/Dialog/UpdateMoreAction.vue +2 -2
  14. package/components/EntryPassInformation.vue +443 -0
  15. package/components/{CheckoutItemMain.vue → EquipmentItemMain.vue} +88 -85
  16. package/components/{SupplyManagement.vue → EquipmentManagement.vue} +3 -3
  17. package/components/Input/DateTimePicker.vue +17 -11
  18. package/components/Input/InputPhoneNumberV2.vue +8 -0
  19. package/components/ManageChecklistMain.vue +400 -36
  20. package/components/ScheduleAreaMain.vue +56 -0
  21. package/components/TableHygiene.vue +47 -430
  22. package/components/UnitPersonCard.vue +123 -0
  23. package/components/VehicleAddSelection.vue +2 -2
  24. package/components/VehicleForm.vue +78 -19
  25. package/components/VehicleManagement.vue +164 -40
  26. package/components/VisitorForm.vue +95 -20
  27. package/components/VisitorFormSelection.vue +13 -2
  28. package/components/VisitorManagement.vue +83 -55
  29. package/composables/useAccessManagement.ts +52 -0
  30. package/composables/useCleaningPermission.ts +7 -7
  31. package/composables/useDashboardData.ts +2 -2
  32. package/composables/{useSupply.ts → useEquipment.ts} +11 -11
  33. package/composables/{useCheckout.ts → useEquipmentItem.ts} +7 -7
  34. package/composables/{useCheckoutPermission.ts → useEquipmentItemPermission.ts} +13 -13
  35. package/composables/useEquipmentManagementPermission.ts +96 -0
  36. package/composables/{useSupplyPermission.ts → useEquipmentPermission.ts} +9 -9
  37. package/composables/usePeople.ts +4 -3
  38. package/composables/useVehicle.ts +35 -2
  39. package/composables/useVisitor.ts +3 -3
  40. package/composables/useWorkOrder.ts +25 -3
  41. package/package.json +3 -2
  42. package/types/building.d.ts +1 -1
  43. package/types/cleaner-schedule.d.ts +1 -0
  44. package/types/{checkout-item.d.ts → equipment-item.d.ts} +3 -3
  45. package/types/{supply.d.ts → equipment.d.ts} +2 -2
  46. package/types/html2pdf.d.ts +19 -0
  47. package/types/people.d.ts +5 -2
  48. package/types/site.d.ts +8 -0
  49. package/types/vehicle.d.ts +4 -3
  50. package/types/visitor.d.ts +2 -1
  51. package/.playground/app.vue +0 -41
  52. package/.playground/eslint.config.mjs +0 -6
  53. package/.playground/nuxt.config.ts +0 -22
  54. package/.playground/pages/feedback.vue +0 -30
@@ -1,4 +1,4 @@
1
- declare type TSupply = {
1
+ declare type TEquipment = {
2
2
  _id: string;
3
3
  name: string;
4
4
  qty: number;
@@ -8,4 +8,4 @@ declare type TSupply = {
8
8
  updatedAt: string;
9
9
  };
10
10
 
11
- declare type TSupplyCreate = Pick<TSupply, "name" | "unitOfMeasurement">;
11
+ declare type TEquipmentCreate = Pick<TEquipment, "name" | "unitOfMeasurement">;
@@ -0,0 +1,19 @@
1
+ declare module "html2pdf.js" {
2
+ interface Html2PdfOptions {
3
+ margin?: number | number[];
4
+ filename?: string;
5
+ image?: { type?: string; quality?: number };
6
+ html2canvas?: Record<string, any>;
7
+ jsPDF?: Record<string, any>;
8
+ }
9
+
10
+ interface Html2Pdf {
11
+ set(options: Html2PdfOptions): Html2Pdf;
12
+ from(element: HTMLElement): Html2Pdf;
13
+ save(): Promise<void>;
14
+ output(type: string): Promise<any>;
15
+ }
16
+
17
+ function html2pdf(): Html2Pdf;
18
+ export default html2pdf;
19
+ }
package/types/people.d.ts CHANGED
@@ -17,11 +17,14 @@ declare type TPeople = {
17
17
  site?: string,
18
18
  type?: TPeopleType;
19
19
  plates?: TPlateNumber[]
20
+ email?: string;
21
+ files?: { name: string, id: string }[];
22
+ isOwner?: boolean;
20
23
  };
21
24
 
22
- declare type TPlateNumber = { plateNumber: string, recNo: string }
25
+ declare type TPlateNumber = { plateNumber: string, recNo: string, _id?: string, status: "active" | "deleted" | "pending", type: TVehicleType };
23
26
 
24
27
 
25
- declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type">
28
+ declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type" | "isOwner">
26
29
 
27
30
  declare type TPeopleType = "guest" | "resident" | "tenant"
package/types/site.d.ts CHANGED
@@ -17,4 +17,12 @@ declare type TSite = {
17
17
  createdAt?: string;
18
18
  updatedAt?: string;
19
19
  deletedAt?: string;
20
+ address: {
21
+ line1: string;
22
+ line2?: string;
23
+ city: string;
24
+ state?: string;
25
+ postalCode: string;
26
+ country: string;
27
+ }
20
28
  };
@@ -18,13 +18,14 @@ declare type TVehicle = {
18
18
  org?: string;
19
19
  _id?: string;
20
20
  recNo?: string;
21
+ status?: TVehicleStatus;
21
22
  };
22
23
 
23
- declare type TVehicleType = "whitelist" | "blocklist" | "seasonpass";
24
+ declare type TVehicleType = "whitelist" | "blocklist";
25
+ declare type TVehicleStatus = "active" | 'inactive' | "pending" | "deleted" | "rejected" ;
24
26
 
25
27
  declare type TVehiclePayload = Pick<
26
28
  TVehicle,
27
- | "plateNumber"
28
29
  | "type"
29
30
  | "category"
30
31
  | "direction"
@@ -40,4 +41,4 @@ declare type TVehiclePayload = Pick<
40
41
  | "end"
41
42
  | "site"
42
43
  | "org"
43
- >;
44
+ > & { plateNumber: string[] };
@@ -1,4 +1,5 @@
1
1
  declare type TVisitor = {
2
+ _id?: string;
2
3
  name?: string;
3
4
  type: TVisitorType;
4
5
  company?: string | "";
@@ -23,7 +24,7 @@ declare type TVisitor = {
23
24
 
24
25
  declare type TVisitorType = "contractor" | "delivery" | "walk-in" | "pick-up" | "drop-off" | "guest";
25
26
 
26
- declare type TVisitorPayload = Pick<TVisitor, "name" | "type" | "company" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "checkOut" | "contractorType" | "deliveryType" | "nric" | "contact" | "remarks" | "attachments" | "org" | "site"> & {
27
+ declare type TVisitorPayload = Pick<TVisitor, "name" | "type" | "company" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "checkOut" | "contractorType" | "deliveryType" | "nric" | "contact" | "remarks" | "attachments" | "org" | "site" | "status"> & {
27
28
  members?: TMemberInfo[]
28
29
  }
29
30
 
@@ -1,41 +0,0 @@
1
- <template>
2
- <v-app>
3
- <LayoutHeader />
4
-
5
- <LayoutNavigationDrawer :navigation-items="navigationItems" />
6
-
7
- <v-main>
8
- <NuxtLayout> <NuxtPage /> </NuxtLayout>
9
- </v-main>
10
- </v-app>
11
- </template>
12
-
13
- <script setup lang="ts">
14
- const navigationItems = computed(() => {
15
- const items: Array<TNavigationItem> = [];
16
- items.push(
17
- {
18
- title: "Create new request",
19
- route: { name: "index" },
20
- icon: "mdi-plus",
21
- },
22
- {
23
- title: "Requests",
24
- route: { name: "index" },
25
- icon: "mdi-account-circle",
26
- },
27
- {
28
- title: "Draft",
29
- route: { name: "index" },
30
- icon: "mdi-account-circle",
31
- },
32
- {
33
- title: "Feedback",
34
- route: { name: "feedback" },
35
- icon: "mdi-account-circle",
36
- }
37
- );
38
-
39
- return items;
40
- });
41
- </script>
@@ -1,6 +0,0 @@
1
- // @ts-check
2
- import withNuxt from './.nuxt/eslint.config.mjs'
3
-
4
- export default withNuxt(
5
- // Your custom configs here
6
- )
@@ -1,22 +0,0 @@
1
- export default defineNuxtConfig({
2
- extends: [".."],
3
- modules: ["@nuxt/eslint"],
4
- compatibilityDate: "2024-11-03",
5
-
6
- runtimeConfig: {
7
- public: {
8
- cookieConfig: {
9
- domain: (process.env.DOMAIN as string) ?? "localhost",
10
- secure: true,
11
- maxAge: 30 * 24 * 60 * 60,
12
- },
13
- APP_NAME: (process.env.APP_NAME as string) ?? "App",
14
- APP_NAME_ROUTE: (process.env.APP_NAME_ROUTE as string) ?? "index",
15
- APP_ACCOUNT: (process.env.APP_ACCOUNT as string) ?? "",
16
- API_DO_STORAGE_ENDPOINT:
17
- (process.env.API_DO_STORAGE_ENDPOINT as string) ?? "",
18
- APP_ADMIN: (process.env.APP_ADMIN as string) ?? "",
19
- APP_CBA_RECAP: (process.env.APP_CBA_RECAP as string) ?? "",
20
- },
21
- },
22
- });
@@ -1,30 +0,0 @@
1
- <template>
2
- <v-row class="no-gutters" align="center" justify="center">
3
- <v-col cols="12" md="10" lg="10">
4
- <FeedbackListView @click:create="showCreateDialog = true" />
5
- </v-col>
6
-
7
- <v-dialog
8
- v-model="showCreateDialog"
9
- fullscreen
10
- transition="dialog-right-transition"
11
- persistent
12
- >
13
- <v-card
14
- class="ml-auto"
15
- style="
16
- height: 100vh;
17
- width: 400px;
18
- border-top-left-radius: 12px;
19
- border-bottom-left-radius: 12px;
20
- "
21
- >
22
- <FeedbackFormCreate @close="showCreateDialog = false" />
23
- </v-card>
24
- </v-dialog>
25
- </v-row>
26
- </template>
27
-
28
- <script lang="ts" setup>
29
- const showCreateDialog = ref(false);
30
- </script>