@7365admin1/layer-common 3.2.7 → 3.2.8-staging.201

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 (283) hide show
  1. package/assets/css/primitives.css +1113 -0
  2. package/assets/css/screens.css +1097 -0
  3. package/assets/css/shell.css +258 -0
  4. package/assets/css/tokens.css +236 -0
  5. package/components/AcceptDialog.vue +17 -18
  6. package/components/AccessCard/AvailableStats.vue +24 -16
  7. package/components/AccessCardAddForm.vue +42 -42
  8. package/components/AccessCardAssignToUnitForm.vue +13 -21
  9. package/components/AccessCardDeleteDialog.vue +41 -39
  10. package/components/AccessCardDetailsDialog.vue +125 -79
  11. package/components/AccessCardPreviewDialog.vue +58 -84
  12. package/components/AccessCardQrTagging.vue +60 -63
  13. package/components/AccessCardReplaceForm.vue +27 -23
  14. package/components/AccessManagement.vue +86 -85
  15. package/components/AddEqupmentForm.vue +18 -22
  16. package/components/AddPassKeyToVisitor.vue +95 -73
  17. package/components/AppButton.vue +62 -0
  18. package/components/AppCard.vue +20 -0
  19. package/components/AppDateField.vue +49 -0
  20. package/components/AppField.vue +76 -0
  21. package/components/AppKpiTile.vue +65 -0
  22. package/components/AppSegmented.vue +38 -0
  23. package/components/AppSelect.vue +247 -0
  24. package/components/AreaChecklistHistoryLogs.vue +51 -44
  25. package/components/AreaChecklistHistoryMain.vue +14 -7
  26. package/components/AreaFormDialog.vue +71 -59
  27. package/components/AreaMain.vue +73 -107
  28. package/components/AttachmentsViewer.vue +84 -22
  29. package/components/AttendanceCheckInOutDialog.vue +85 -88
  30. package/components/AttendanceDetailsDialog.vue +57 -63
  31. package/components/AttendanceMain.vue +4 -3
  32. package/components/AttendanceMapSearchDialog.vue +42 -44
  33. package/components/AttendanceSettingsDialog.vue +79 -63
  34. package/components/Avatar/Main.vue +54 -2
  35. package/components/BillingMain.vue +26 -30
  36. package/components/BtnUploadFile.vue +53 -11
  37. package/components/BuildingForm.vue +34 -27
  38. package/components/BuildingManagement/buildings.vue +39 -39
  39. package/components/BuildingManagement/units.vue +26 -42
  40. package/components/BuildingUnitFormAdd.vue +20 -23
  41. package/components/BuildingUnitFormEdit.vue +8 -4
  42. package/components/BulletinBoardForm.vue +19 -24
  43. package/components/BulletinBoardManagement.vue +49 -57
  44. package/components/BulletinBoardView.vue +9 -6
  45. package/components/BulletinExpirationChip.vue +13 -4
  46. package/components/Button/Close.vue +2 -2
  47. package/components/CameraForm.vue +21 -22
  48. package/components/CameraMain.vue +50 -49
  49. package/components/Card/DeleteConfirmation.vue +24 -22
  50. package/components/Card/MemberInfoSummary.vue +28 -3
  51. package/components/Card/Toggle.vue +15 -3
  52. package/components/CardToolbar.vue +37 -0
  53. package/components/Carousel.vue +56 -36
  54. package/components/Chat/Bubbles.vue +43 -14
  55. package/components/Chat/Information.vue +49 -32
  56. package/components/Chat/ListCard.vue +38 -9
  57. package/components/Chat/Message.vue +41 -15
  58. package/components/Chat/Navigation.vue +27 -15
  59. package/components/Chat/SkeletonLoader.vue +9 -2
  60. package/components/ChecklistItemRow.vue +25 -1
  61. package/components/CleaningScheduleMain.vue +44 -49
  62. package/components/ClientDetailForm.vue +81 -56
  63. package/components/ClientMain.vue +92 -82
  64. package/components/ConfirmDialog.vue +14 -8
  65. package/components/Container/Standard.vue +9 -7
  66. package/components/CreateSubsciptionPlan.vue +148 -89
  67. package/components/DashboardEmptyState.vue +48 -3
  68. package/components/DashboardMain.vue +924 -676
  69. package/components/DashboardPanel.vue +84 -21
  70. package/components/DeliveryCompany.vue +34 -20
  71. package/components/Dialog/DeleteConfirmation.vue +20 -21
  72. package/components/Dialog/ReplaceAutofillPrompt.vue +19 -26
  73. package/components/Dialog/ReusablePrompt.vue +30 -29
  74. package/components/Dialog/UpdateMoreAction.vue +62 -59
  75. package/components/DocumentForm.vue +14 -21
  76. package/components/DocumentManagement.vue +162 -108
  77. package/components/DocumentViewer.vue +29 -12
  78. package/components/DrawImage.vue +29 -21
  79. package/components/EntryPass/QrTemplatePreview.vue +27 -16
  80. package/components/EntryPassInformation.vue +40 -10
  81. package/components/EntryPassMain.vue +49 -27
  82. package/components/EquipmentItemMain.vue +84 -97
  83. package/components/EquipmentManagementMain.vue +81 -103
  84. package/components/Facility/BookingSetup.vue +43 -52
  85. package/components/Feedback/Form.vue +26 -12
  86. package/components/FeedbackMain.vue +35 -49
  87. package/components/FileInput.vue +75 -58
  88. package/components/FileInputWithList.vue +59 -12
  89. package/components/FormDialog.vue +60 -21
  90. package/components/HidAccessLogDashboard.vue +512 -490
  91. package/components/HidCameraCaptureDialog.vue +216 -0
  92. package/components/HidEnabledGate.vue +67 -9
  93. package/components/HidIntercomManagement.vue +1322 -653
  94. package/components/HidQrCodeConfiguration.vue +1030 -258
  95. package/components/HidReaderForm.vue +142 -59
  96. package/components/HidReaderManagement.vue +211 -323
  97. package/components/HidServiceSettingsPanel.vue +44 -13
  98. package/components/HidUserEnrollment.vue +1185 -412
  99. package/components/HygieneUpdateMoreAction.vue +44 -44
  100. package/components/IncidentReport/Authorities.vue +30 -18
  101. package/components/IncidentReport/IncidentInformation.vue +10 -10
  102. package/components/IncidentReport/IncidentInformationDownload.vue +3 -4
  103. package/components/IncidentReport/affectedEntities.vue +41 -20
  104. package/components/Input/Date.vue +3 -0
  105. package/components/Input/DatePicker.vue +1 -2
  106. package/components/Input/DateTimePicker.vue +1 -1
  107. package/components/Input/File.vue +55 -10
  108. package/components/Input/FileV2.vue +39 -6
  109. package/components/Input/InputPhoneNumberV2.vue +2 -1
  110. package/components/Input/ListGroupSelection.vue +56 -8
  111. package/components/Input/NRICNumber.vue +1 -0
  112. package/components/Input/NewDate.vue +1 -0
  113. package/components/Input/Number.vue +1 -0
  114. package/components/Input/Password.vue +1 -0
  115. package/components/Input/PhoneNumber.vue +21 -1
  116. package/components/Input/VehicleNumber.vue +1 -0
  117. package/components/InputLabel.vue +2 -2
  118. package/components/InvitationClientForm.vue +21 -19
  119. package/components/InvitationForm.vue +15 -21
  120. package/components/InvitationMain.vue +46 -61
  121. package/components/Layout/Header.vue +263 -36
  122. package/components/Layout/NavigationDrawer.vue +300 -30
  123. package/components/ListItem.vue +33 -3
  124. package/components/LocalPagination.vue +27 -3
  125. package/components/ManageChecklistMain.vue +136 -86
  126. package/components/MemberInformation.vue +32 -16
  127. package/components/MemberMain.vue +113 -93
  128. package/components/MyAttendanceMain.vue +3 -5
  129. package/components/NavigationItem.vue +83 -3
  130. package/components/Nfc/NFCPatrolReportMain.vue +47 -33
  131. package/components/Nfc/NFCPatrolRouteForm.vue +18 -20
  132. package/components/Nfc/NFCPatrolRouteMain.vue +116 -103
  133. package/components/Nfc/NFCPatrolSettings.vue +14 -4
  134. package/components/Nfc/NFCTagForm.vue +22 -8
  135. package/components/Nfc/NFCTagMain.vue +41 -43
  136. package/components/Nfc/PatrolReport/DailyReportTab.vue +8 -1
  137. package/components/Nfc/PatrolReport/MonthlyReportTab.vue +8 -1
  138. package/components/Nfc/PatrolReport/MonthlyReportTable.vue +5 -3
  139. package/components/Nfc/PatrolReport/PatrolActivityTable.vue +26 -6
  140. package/components/Nfc/PatrolReport/PatrolReportTab.vue +8 -0
  141. package/components/Nfc/PatrolReport/PatrolRouteSummary.vue +41 -9
  142. package/components/Nfc/PatrolReport/RemarksDialog.vue +39 -9
  143. package/components/Nfc/PatrolReport/ReportEmptyState.vue +29 -9
  144. package/components/Nfc/PatrolReport/ReportFilters.vue +19 -10
  145. package/components/Nfc/PatrolReport/ReportLocationHeader.vue +32 -6
  146. package/components/Nfc/PatrolReport/SummaryReportTable.vue +28 -6
  147. package/components/NotificationSettings.vue +373 -0
  148. package/components/NumberSettingField.vue +9 -2
  149. package/components/OnlineFormConfigurationForm.vue +725 -237
  150. package/components/OnlineFormFill.vue +213 -106
  151. package/components/OnlineFormRenderPreview.vue +25 -30
  152. package/components/OnlineFormsConfiguration.vue +113 -109
  153. package/components/OrgViewDialog.vue +34 -16
  154. package/components/OvernightParkingAvailability.vue +49 -26
  155. package/components/OvernightParkingManagement.vue +78 -18
  156. package/components/PageHeader.vue +43 -0
  157. package/components/PassInformation.vue +109 -53
  158. package/components/PasswordConfirmation.vue +44 -26
  159. package/components/PeopleForm.vue +41 -20
  160. package/components/PhotoUpload.vue +110 -48
  161. package/components/PlaceholderComponent.vue +35 -19
  162. package/components/PlanActionsMenu.vue +12 -2
  163. package/components/PlanStatusBadge.vue +7 -8
  164. package/components/PlateNumberDisplay.vue +9 -6
  165. package/components/QrTemplate/PrintDialog.vue +66 -43
  166. package/components/RolePermissionFormCreate.vue +104 -79
  167. package/components/RolePermissionFormPreviewUpdate.vue +111 -109
  168. package/components/RolePermissionMain.vue +183 -81
  169. package/components/ScanVisitorQRCode.vue +99 -35
  170. package/components/ScheduleAreaMain.vue +34 -59
  171. package/components/ScheduleTaskForm.vue +61 -42
  172. package/components/ScheduleTaskMain.vue +56 -69
  173. package/components/SearchVehicleNumberUser.vue +39 -37
  174. package/components/ServiceProviderFormCreate.vue +29 -20
  175. package/components/ServiceProviderInvitationPrompt.vue +155 -0
  176. package/components/ServiceProviderMain.vue +601 -432
  177. package/components/Signature.vue +40 -34
  178. package/components/SignaturePad.vue +5 -29
  179. package/components/SiteSettings.vue +41 -11
  180. package/components/SiteSettingsWorkOrder.vue +61 -30
  181. package/components/SlideCardGroup.vue +35 -11
  182. package/components/Snackbar.vue +36 -3
  183. package/components/SpecificAttr.vue +18 -8
  184. package/components/StatusChip.vue +156 -0
  185. package/components/StockCard.vue +17 -12
  186. package/components/SubscriptionPlanTable.vue +207 -140
  187. package/components/SwitchContext.vue +201 -9
  188. package/components/TableHygiene.vue +36 -46
  189. package/components/TableList.vue +10 -10
  190. package/components/TableListSecondary.vue +105 -54
  191. package/components/TableMain.vue +251 -78
  192. package/components/TableV3.vue +61 -70
  193. package/components/TiptapEditor.vue +33 -40
  194. package/components/TiptapEditorQr.vue +5 -2
  195. package/components/Tooltip/Info.vue +69 -24
  196. package/components/UnitMain.vue +40 -60
  197. package/components/UnitPersonCard.vue +42 -13
  198. package/components/VehicleAddSelection.vue +48 -32
  199. package/components/VehicleForm.vue +112 -129
  200. package/components/VehicleManagement.vue +26 -12
  201. package/components/VehicleUpdateMoreAction.vue +59 -46
  202. package/components/VisitorDataFromScannedQRCodeForm.vue +90 -65
  203. package/components/VisitorForm.vue +774 -210
  204. package/components/VisitorFormSelection.vue +40 -37
  205. package/components/VisitorManagement.vue +239 -82
  206. package/components/VisitorPassKeyQRScanner.vue +65 -18
  207. package/components/VisitorSearchResultSummary.vue +60 -16
  208. package/components/VisitorSocketPopUp.vue +22 -14
  209. package/components/VisitorsReportPreview.vue +44 -29
  210. package/components/WorkOrder/Create.vue +26 -17
  211. package/components/WorkOrder/ListView.vue +38 -7
  212. package/components/WorkOrder/Main.vue +62 -59
  213. package/composables/useFeedback.ts +3 -3
  214. package/composables/useHidAmico.ts +269 -0
  215. package/composables/useHidNavigation.ts +2 -9
  216. package/composables/useMember.ts +3 -3
  217. package/composables/useNFCPatrolDailyReport.ts +13 -0
  218. package/composables/useNFCPatrolMonthlyReport.ts +22 -56
  219. package/composables/useNFCPatrolReport.ts +13 -0
  220. package/composables/useNotificationPreference.ts +87 -0
  221. package/composables/useOnlineFormPages.ts +2 -0
  222. package/composables/useRole.ts +22 -0
  223. package/composables/useServiceProvider.ts +3 -3
  224. package/composables/useServiceProviderInvitation.ts +145 -0
  225. package/composables/useSipWebPhone.ts +336 -0
  226. package/composables/useSubscriptionPlan.ts +62 -0
  227. package/composables/useThemePreference.ts +63 -0
  228. package/composables/useVisitor.ts +6 -1
  229. package/composables/useWebUsb.ts +127 -37
  230. package/composables/useWorkOrder.ts +17 -3
  231. package/error.vue +30 -6
  232. package/nuxt.config.ts +36 -0
  233. package/package.json +25 -4
  234. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +2 -2
  235. package/pages/[org]/[site]/access-mgmt/{identity-mapping → hid-cards}/index.vue +2 -2
  236. package/pages/[org]/[site]/access-mgmt/intercom/index.vue +1 -1
  237. package/pages/notification-settings.vue +19 -0
  238. package/pages/payment-method-linked.vue +34 -10
  239. package/pages/require-customer.vue +48 -10
  240. package/pages/require-organization-membership.vue +32 -8
  241. package/pages/unauthorized.vue +29 -4
  242. package/plugins/secure-member.client.ts +21 -56
  243. package/plugins/vuetify.ts +69 -2
  244. package/types/nfc-patrol-report.ts +3 -2
  245. package/types/site.d.ts +71 -0
  246. package/types/subscription.ts +18 -11
  247. package/utils/breadcrumb.test.ts +108 -0
  248. package/utils/breadcrumb.ts +82 -0
  249. package/utils/dashboard.test.ts +118 -0
  250. package/utils/dashboard.ts +53 -0
  251. package/utils/data.test.ts +95 -0
  252. package/utils/data.ts +40 -2
  253. package/utils/hid-discover.test.ts +102 -0
  254. package/utils/list-page.test.ts +60 -0
  255. package/utils/list-page.ts +38 -0
  256. package/utils/materialSymbols.ts +363 -0
  257. package/utils/nav-sections.test.ts +190 -0
  258. package/utils/nav-sections.ts +151 -0
  259. package/utils/nfc-patrol-report.test.ts +130 -0
  260. package/utils/nfc-patrol-report.ts +101 -0
  261. package/utils/role.test.ts +69 -0
  262. package/utils/role.ts +10 -0
  263. package/utils/route-name.test.ts +85 -0
  264. package/utils/route-name.ts +24 -0
  265. package/utils/status.test.ts +110 -0
  266. package/utils/status.ts +135 -0
  267. package/utils/table-card.test.ts +84 -0
  268. package/utils/theme-aa-ledger.ts +148 -0
  269. package/utils/theme.test.ts +485 -7
  270. package/utils/theme.ts +295 -110
  271. package/.changeset/README.md +0 -8
  272. package/.changeset/config.json +0 -11
  273. package/.editorconfig +0 -12
  274. package/.github/workflows/main.yml +0 -17
  275. package/.github/workflows/publish-staging.yml +0 -47
  276. package/.github/workflows/publish.yml +0 -39
  277. package/PUBLISHING.md +0 -269
  278. package/components/HidIdentityMapping.vue +0 -975
  279. package/components/ScheduleTaskAreaFormDialog.vue +0 -144
  280. package/components/ScheduleTaskAreaUpdateMoreAction.vue +0 -109
  281. package/components/ScheduleTastTicketMain.vue +0 -182
  282. package/components/TableWithButton.vue +0 -94
  283. package/test/visitor-socket.test.mjs +0 -36
@@ -5,7 +5,11 @@
5
5
  fullscreen
6
6
  >
7
7
  <v-card>
8
- <v-toolbar style="background-color: white">
8
+ <!-- The inline `background-color: white` painted this bar white in BOTH
9
+ themes - a white slab across the top of the dialog on the dark one.
10
+ Removed, so Vuetify paints it from the theme's `surface` as every
11
+ other converted bar in the estate does. -->
12
+ <v-toolbar>
9
13
  <v-btn icon="mdi-arrow-left" @click="closeDialog"></v-btn>
10
14
 
11
15
  <v-toolbar-title>Pass & Keys</v-toolbar-title>
@@ -14,7 +18,7 @@
14
18
  </v-toolbar>
15
19
  <v-row no-gutters class="pa-15">
16
20
  <v-col cols="12">
17
- <v-card class="pa-6">
21
+ <AppCard class="pa-6">
18
22
  <v-row no-gutters>
19
23
  <v-col
20
24
  cols="12"
@@ -67,7 +71,9 @@
67
71
  >
68
72
  <template v-slot:label>
69
73
  Select template
70
- <span class="text-red font-weight-bold">*</span>
74
+ <!-- `text-red` is Vuetify's own palette red, a literal that
75
+ ignores the theme. `text-error` is the design's. -->
76
+ <span class="text-error font-weight-bold">*</span>
71
77
  </template>
72
78
  <!-- <template v-slot:append-item>
73
79
  <div v-intersect="endIntersectTemplateList" />
@@ -112,7 +118,7 @@
112
118
  @click="selectedChoicePaperSizeOrientation = 'A4'"
113
119
  :color="
114
120
  selectedChoicePaperSizeOrientation === 'A4'
115
- ? 'green'
121
+ ? 'success'
116
122
  : ''
117
123
  "
118
124
  >
@@ -156,7 +162,7 @@
156
162
  @click="selectedChoicePaperSizeOrientation = 'CCP'"
157
163
  :color="
158
164
  selectedChoicePaperSizeOrientation === 'CCP'
159
- ? 'green'
165
+ ? 'success'
160
166
  : ''
161
167
  "
162
168
  >
@@ -199,7 +205,7 @@
199
205
  @click="selectedChoicePaperSizeOrientation = 'CCL'"
200
206
  :color="
201
207
  selectedChoicePaperSizeOrientation === 'CCL'
202
- ? 'green'
208
+ ? 'success'
203
209
  : ''
204
210
  "
205
211
  >
@@ -310,7 +316,7 @@
310
316
  <template v-slot:loader="{ isActive }">
311
317
  <v-progress-linear
312
318
  :active="isActive"
313
- color="deep-purple"
319
+ color="primary-button"
314
320
  height="4"
315
321
  indeterminate
316
322
  ></v-progress-linear>
@@ -436,7 +442,7 @@
436
442
  cols="12"
437
443
  sm="7"
438
444
  md="1"
439
- :class="`text-capitalize text-body-2 white--text text ${
445
+ :class="`text-capitalize text-body-2 ${
440
446
  $vuetify.display.xs && 'mb-1'
441
447
  }`"
442
448
  >
@@ -483,7 +489,7 @@
483
489
  cols="12"
484
490
  sm="7"
485
491
  md="3"
486
- :class="`text-capitalize text-body-2 white--text text ${
492
+ :class="`text-capitalize text-body-2 ${
487
493
  $vuetify.display.xs && 'mb-1'
488
494
  }`"
489
495
  >
@@ -524,7 +530,7 @@
524
530
  cols="12"
525
531
  sm="7"
526
532
  md="1"
527
- :class="`text-capitalize text-body-2 white--text text ${
533
+ :class="`text-capitalize text-body-2 ${
528
534
  $vuetify.display.xs && 'mb-1'
529
535
  }`"
530
536
  >
@@ -569,7 +575,7 @@
569
575
  cols="12"
570
576
  sm="7"
571
577
  md="4"
572
- :class="`text-capitalize text-body-2 white--text text ${
578
+ :class="`text-capitalize text-body-2 ${
573
579
  $vuetify.display.xs && 'mb-1'
574
580
  }`"
575
581
  >
@@ -610,7 +616,7 @@
610
616
  cols="12"
611
617
  sm="7"
612
618
  md="2"
613
- :class="`text-capitalize text-body-2 white--text text ${
619
+ :class="`text-capitalize text-body-2 ${
614
620
  $vuetify.display.xs && 'mb-1'
615
621
  }`"
616
622
  >
@@ -728,16 +734,15 @@
728
734
 
729
735
  <v-row no-gutters class="pt-2">
730
736
  <v-col cols="12" class="d-flex justify-end">
731
- <v-btn
732
- color="primary"
733
- @click="printContent"
734
- :disabled="isPrintDisabled"
735
- >
737
+ <!-- `color="primary"` on a v-btn asked Vuetify to FILL with the
738
+ foreground token. The design's filled action is AppButton,
739
+ which paints from `primary-button`. -->
740
+ <AppButton @click="printContent" :disabled="isPrintDisabled">
736
741
  Print
737
- </v-btn>
742
+ </AppButton>
738
743
  </v-col>
739
744
  </v-row>
740
- </v-card>
745
+ </AppCard>
741
746
  </v-col>
742
747
  </v-row>
743
748
  </v-card>
@@ -746,7 +751,8 @@
746
751
  <!-- start range dialog -->
747
752
  <v-snackbar
748
753
  v-model="snackbarStartRange"
749
- color="red"
754
+ class="app-toast"
755
+ color="error"
750
756
  :timeout="5000"
751
757
  multi-line
752
758
  >
@@ -761,8 +767,11 @@
761
767
  generate
762
768
  </v-btn>
763
769
  <template v-slot:actions>
770
+ <!-- Was `color="white"`. The dark theme's `error` fill is a LIGHT colour
771
+ carrying dark ink (`on-error`), so a hardcoded white cross measured
772
+ ~2:1 on it. Dropping the colour lets the button inherit `on-error`
773
+ and read correctly in both themes. -->
764
774
  <v-btn
765
- color="white"
766
775
  variant="text"
767
776
  @click="snackbarStartRange = false"
768
777
  icon="mdi-close"
@@ -806,6 +815,10 @@ const props = defineProps<{
806
815
  start: any;
807
816
  }>();
808
817
 
818
+ // Relative import, never Nuxt auto-import: this layer's `utils/` are auto-imported
819
+ // into the consuming apps but not reliably into the layer's own components.
820
+ import { pickRouteName } from "../../utils/route-name";
821
+
809
822
  const route = useRoute();
810
823
  const router = useRouter();
811
824
  const emit = defineEmits(["update:close"]);
@@ -981,12 +994,25 @@ const closeDialog = async (type?: string, tabType?: string) => {
981
994
  dialogType.value = "generate";
982
995
  generatePass.value = true;
983
996
  } else {
984
- router.push({
985
- name: "keys-visitor-pass-add",
986
- query: {
987
- site: route.params.site as string,
988
- },
989
- });
997
+ // Two faults here. The name is only correct in an app whose keys pages
998
+ // sit at the root - every consumer that renders this dialog nests them
999
+ // under [org]/[site], so `router.push` threw on an unknown name and the
1000
+ // dialog's Generate action died. And `org` / `site` are PATH params on
1001
+ // the destination, so sending `site` as a query left both unfilled.
1002
+ const passAdd = pickRouteName(
1003
+ router,
1004
+ "org-site-keys-visitor-pass-add",
1005
+ "keys-visitor-pass-add"
1006
+ );
1007
+ if (passAdd) {
1008
+ router.push({
1009
+ name: passAdd,
1010
+ params: {
1011
+ org: route.params.org as string,
1012
+ site: route.params.site as string,
1013
+ },
1014
+ });
1015
+ }
990
1016
  }
991
1017
  resetPrintState();
992
1018
  snackbarStartRange.value = false;
@@ -1226,23 +1252,20 @@ async function nextPage() {
1226
1252
  </script>
1227
1253
 
1228
1254
  <style scoped>
1229
- .custom-placeholer-color input::placeholder {
1230
- color: red !important;
1231
- opacity: 1;
1232
- }
1233
-
1234
- .custom-label-color .v-label {
1235
- color: red;
1236
- opacity: 1;
1237
- }
1238
-
1239
- .custom-placeholer-color input,
1240
- .custom-label-color input {
1241
- color: red !important;
1242
- }
1243
-
1255
+ /*
1256
+ `.custom-placeholer-color` and `.custom-label-color` were declared here and
1257
+ applied to NOTHING - neither class appears anywhere in the template. Deleted
1258
+ rather than left as three blocks of red-text styling waiting to be pasted
1259
+ onto a field by mistake.
1260
+
1261
+ `.placeHolderDarken` IS applied (the three paper-size fields). Its
1262
+ `color: primary` was not a colour - `primary` is a Vuetify theme NAME, not a
1263
+ CSS keyword, so the browser dropped that one declaration as invalid and the
1264
+ placeholder has never been darkened. The `opacity: 1` beside it did apply.
1265
+ Now points at the design's muted ink, which is what "darken" meant.
1266
+ */
1244
1267
  .placeHolderDarken ::placeholder {
1245
- color: primary !important;
1268
+ color: var(--muted) !important;
1246
1269
  opacity: 1;
1247
1270
  }
1248
1271
  </style>
@@ -1,16 +1,11 @@
1
1
  <template>
2
- <v-card width="100%">
3
- <v-toolbar>
4
- <v-row no-gutters class="fill-height px-6" align="center">
5
- <span class="font-weight-bold text-h5">Create Role</span>
6
- <v-spacer />
7
- <v-btn icon density="comfortable" @click="cancel">
8
- <v-icon>mdi-close</v-icon>
9
- </v-btn>
10
- </v-row>
11
- </v-toolbar>
12
-
13
- <v-card-text style="max-height: 75vh; overflow-y: auto">
2
+ <v-card width="100%" class="screen-modal role-create">
3
+ <div class="role-create__head">
4
+ <v-card-title>Create Role</v-card-title>
5
+ <AppButton variant="icon" icon="mdi-close" aria-label="Close" @click="cancel" />
6
+ </div>
7
+
8
+ <div class="screen-modal__body role-create__body filter-field">
14
9
  <v-form v-model="validForm" :disabled="disable">
15
10
  <v-row no-gutters>
16
11
  <v-col cols="12" class="mt-2">
@@ -42,31 +37,30 @@
42
37
  </v-col>
43
38
 
44
39
  <v-col cols="12" class="mt-3">
45
- <div class="d-flex align-center ga-4 text-caption">
40
+ <div class="role-create__legend">
46
41
  <span class="d-flex align-center ga-2">
47
- <v-icon color="amber-darken-2" size="14">mdi-circle</v-icon>
42
+ <v-icon class="role-create__dot--both" size="14">mdi-circle</v-icon>
48
43
  Web and Mobile
49
44
  </span>
50
45
  <span class="d-flex align-center ga-2">
51
- <v-icon color="blue-darken-2" size="14">mdi-circle</v-icon>
46
+ <v-icon class="role-create__dot--web" size="14">mdi-circle</v-icon>
52
47
  Web only
53
48
  </span>
54
49
  </div>
55
50
  </v-col>
56
51
 
57
52
  <v-col cols="12" class="mt-2">
58
- <v-btn
59
- size="small"
60
- variant="tonal"
61
- class="text-none mb-2"
53
+ <AppButton
54
+ variant="ghost"
55
+ class="mb-2"
62
56
  @click="() => toggleSelectAll(!isAllSelected)"
63
57
  >
64
58
  {{ isAllSelected ? "Unselect All" : "Select All" }}
65
- </v-btn>
59
+ </AppButton>
66
60
  </v-col>
67
61
 
68
62
  <v-col cols="12" class="mt-3">
69
- <v-card variant="outlined" border="thin" rounded="lg">
63
+ <div class="role-create__list">
70
64
  <template
71
65
  v-for="(actions, resourceKey, resourceIndex) in safePermissions"
72
66
  :key="resourceKey"
@@ -76,19 +70,15 @@
76
70
  <!-- Category row -->
77
71
  <v-list-item density="compact" :ripple="false">
78
72
  <template #prepend>
79
- <v-chip
73
+ <StatusChip
80
74
  class="mr-3"
81
- size="small"
82
- label
83
- :color="resourceColor(String(resourceKey))"
84
- >
85
- {{ selectedActionCount(String(resourceKey)) }}
86
- </v-chip>
75
+ :dot="false"
76
+ :tone="isWebOnly(String(resourceKey)) ? 'info' : 'warn'"
77
+ :label="String(selectedActionCount(String(resourceKey)))"
78
+ />
87
79
  </template>
88
80
  <v-list-item-title>
89
- <span
90
- class="text-capitalize text-subtitle-2 font-weight-medium"
91
- >
81
+ <span class="text-capitalize role-create__row-title">
92
82
  {{ formatResourceLabel(String(resourceKey)) }}
93
83
  </span>
94
84
  </v-list-item-title>
@@ -98,10 +88,9 @@
98
88
  @update:model-value="
99
89
  toggleCategory(String(resourceKey), $event)
100
90
  "
101
- color="green"
91
+ class="app-switch"
102
92
  density="compact"
103
93
  hide-details
104
- inset
105
94
  />
106
95
  </template>
107
96
  </v-list-item>
@@ -128,72 +117,41 @@
128
117
  $event
129
118
  )
130
119
  "
131
- color="primary"
120
+ color="accent"
132
121
  density="compact"
133
122
  class="mr-2"
134
123
  />
135
124
  </template>
136
125
  <v-list-item-title
137
- class="text-subtitle-2 font-weight-medium text-capitalize"
126
+ class="text-capitalize role-create__row-title"
138
127
  >
139
128
  {{ String(actionKey).replace(/-/g, " ") }}
140
129
  </v-list-item-title>
141
- <v-list-item-subtitle class="text-caption">
130
+ <v-list-item-subtitle class="role-create__row-sub">
142
131
  {{ action.description }}
143
132
  </v-list-item-subtitle>
144
133
  </v-list-item>
145
134
  </template>
146
135
  </template>
147
136
  </template>
148
- </v-card>
137
+ </div>
149
138
  </v-col>
150
139
 
151
140
  <v-col cols="12" class="my-2">
152
141
  <v-row no-gutters>
153
142
  <v-col cols="12" class="text-center">
154
- <span
155
- class="text-none text-subtitle-2 font-weight-medium text-error"
156
- >
157
- {{ message }}
158
- </span>
143
+ <span class="role-create__error">{{ message }}</span>
159
144
  </v-col>
160
145
  </v-row>
161
146
  </v-col>
162
147
  </v-row>
163
148
  </v-form>
164
- </v-card-text>
165
-
166
- <v-toolbar class="pa-0" density="compact">
167
- <v-row no-gutters>
168
- <v-col cols="6" class="pa-0">
169
- <v-btn
170
- block
171
- variant="text"
172
- class="text-none"
173
- size="large"
174
- height="48"
175
- @click="cancel"
176
- >
177
- {{ props.cancelText }}
178
- </v-btn>
179
- </v-col>
180
-
181
- <v-col cols="6" class="pa-0">
182
- <v-btn
183
- block
184
- variant="flat"
185
- color="black"
186
- class="text-none font-weight-bold rounded-0"
187
- height="48"
188
- :disabled="!validForm"
189
- :loading="disable"
190
- @click="submit"
191
- >
192
- Submit
193
- </v-btn>
194
- </v-col>
195
- </v-row>
196
- </v-toolbar>
149
+ </div>
150
+
151
+ <div class="role-create__footer">
152
+ <AppButton variant="ghost" @click="cancel">{{ props.cancelText }}</AppButton>
153
+ <AppButton :disabled="!validForm || disable" @click="submit">Submit</AppButton>
154
+ </div>
197
155
  </v-card>
198
156
  </template>
199
157
 
@@ -259,10 +217,8 @@ function formatResourceLabel(key: string): string {
259
217
  return props.webOnlyResources.includes(key) ? `${label} (Web Only)` : label;
260
218
  }
261
219
 
262
- function resourceColor(resource: string) {
263
- return props.webOnlyResources.includes(resource)
264
- ? "blue-darken-2"
265
- : "amber-darken-2";
220
+ function isWebOnly(resource: string) {
221
+ return props.webOnlyResources.includes(resource);
266
222
  }
267
223
 
268
224
  function isCategoryEnabled(resource: string) {
@@ -406,3 +362,72 @@ const isAllSelected = computed(() => {
406
362
  );
407
363
  });
408
364
  </script>
365
+
366
+ <style scoped>
367
+ .role-create__head {
368
+ display: flex;
369
+ align-items: center;
370
+ justify-content: space-between;
371
+ padding-right: 12px;
372
+ }
373
+
374
+ .role-create__body {
375
+ padding: 0 20px;
376
+ max-height: calc(100vh - 160px);
377
+ }
378
+
379
+ .role-create__legend {
380
+ display: flex;
381
+ align-items: center;
382
+ gap: 16px;
383
+ font-size: var(--fs-breadcrumb);
384
+ color: var(--text2);
385
+ }
386
+
387
+ /* Were `amber-darken-2` / `blue-darken-2` - fixed Vuetify hues that do not
388
+ follow the theme, and the same two the count chip used. Design tones now,
389
+ and the dot and the chip read the same `isWebOnly`, so they cannot drift. */
390
+ .role-create__dot--both {
391
+ color: var(--warn);
392
+ }
393
+
394
+ .role-create__dot--web {
395
+ color: var(--info);
396
+ }
397
+
398
+ /* Was a `variant="outlined"` v-card inside the card - a card on a card. It is
399
+ the list frame, so it takes the design's border and radius and no second
400
+ surface. */
401
+ .role-create__list {
402
+ border: 1px solid var(--border);
403
+ border-radius: var(--r-card);
404
+ overflow: hidden;
405
+ }
406
+
407
+ .role-create__row-title {
408
+ font-size: var(--fs-cell);
409
+ font-weight: var(--fw-cell);
410
+ color: var(--text);
411
+ }
412
+
413
+ .role-create__row-sub {
414
+ font-size: var(--fs-breadcrumb) !important;
415
+ color: var(--text2);
416
+ }
417
+
418
+ .role-create__error {
419
+ font-size: var(--fs-cell);
420
+ font-weight: 600;
421
+ color: var(--err);
422
+ }
423
+
424
+ /* The design's dialog footer. Deliberately not the shared
425
+ `.screen-modal__footer` - that class is on the batch-D branch (#1150), not
426
+ on this base, and a second copy in `screens.css` would collide with it. */
427
+ .role-create__footer {
428
+ display: flex;
429
+ justify-content: flex-end;
430
+ gap: 8px;
431
+ padding: 16px 20px 20px;
432
+ }
433
+ </style>