@7365admin1/layer-common 1.8.0

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 (198) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.editorconfig +12 -0
  4. package/.github/workflows/main.yml +17 -0
  5. package/.github/workflows/publish.yml +39 -0
  6. package/.nuxtrc +1 -0
  7. package/.playground/app.vue +41 -0
  8. package/.playground/eslint.config.mjs +6 -0
  9. package/.playground/nuxt.config.ts +22 -0
  10. package/.playground/pages/feedback.vue +30 -0
  11. package/CHANGELOG.md +263 -0
  12. package/README.md +73 -0
  13. package/app.vue +3 -0
  14. package/components/AccessCardAddForm.vue +363 -0
  15. package/components/AccessManagement.vue +420 -0
  16. package/components/Avatar/Main.vue +68 -0
  17. package/components/BillingMain.vue +66 -0
  18. package/components/BtnUploadFile.vue +139 -0
  19. package/components/BuildingForm.vue +303 -0
  20. package/components/BuildingManagement/buildings.vue +335 -0
  21. package/components/BuildingManagement/units.vue +350 -0
  22. package/components/BuildingUnitFormAdd.vue +441 -0
  23. package/components/BuildingUnitFormEdit.vue +429 -0
  24. package/components/CameraForm.vue +264 -0
  25. package/components/CameraMain.vue +352 -0
  26. package/components/Card/DeleteConfirmation.vue +51 -0
  27. package/components/Card/MemberInfoSummary.vue +44 -0
  28. package/components/Card/Toggle.vue +25 -0
  29. package/components/Chat/Bubbles.vue +53 -0
  30. package/components/Chat/Information.vue +416 -0
  31. package/components/Chat/ListCard.vue +62 -0
  32. package/components/Chat/Message.vue +158 -0
  33. package/components/Chat/Navigation.vue +150 -0
  34. package/components/ConfirmDialog.vue +66 -0
  35. package/components/Container/Standard.vue +33 -0
  36. package/components/DashboardPlaceholder.vue +1524 -0
  37. package/components/Dialog/DeleteConfirmation.vue +51 -0
  38. package/components/Dialog/ReplaceAutofillPrompt.vue +49 -0
  39. package/components/Dialog/UpdateMoreAction.vue +103 -0
  40. package/components/DocumentForm.vue +187 -0
  41. package/components/DocumentManagement.vue +376 -0
  42. package/components/Editor.vue +95 -0
  43. package/components/EntryPassMain.vue +518 -0
  44. package/components/Feedback/Form.vue +173 -0
  45. package/components/FeedbackDetail.vue +599 -0
  46. package/components/FeedbackMain.vue +588 -0
  47. package/components/FormDialog.vue +65 -0
  48. package/components/ImageCarousel.vue +138 -0
  49. package/components/Input/Date.vue +177 -0
  50. package/components/Input/DateTimePicker.vue +131 -0
  51. package/components/Input/File.vue +236 -0
  52. package/components/Input/FileV2.vue +234 -0
  53. package/components/Input/InputPhoneNumberV2.vue +164 -0
  54. package/components/Input/ListGroupSelection.vue +96 -0
  55. package/components/Input/NRICNumber.vue +53 -0
  56. package/components/Input/NewDate.vue +123 -0
  57. package/components/Input/Number.vue +124 -0
  58. package/components/Input/Password.vue +22 -0
  59. package/components/Input/PhoneNumber.vue +188 -0
  60. package/components/Input/VehicleNumber.vue +49 -0
  61. package/components/InputLabel.vue +22 -0
  62. package/components/InvitationForm.vue +359 -0
  63. package/components/InvitationMain.vue +310 -0
  64. package/components/Layout/Header.vue +129 -0
  65. package/components/Layout/NavigationDrawer.vue +44 -0
  66. package/components/ListItem.vue +35 -0
  67. package/components/ListView.vue +87 -0
  68. package/components/LocalPagination.vue +31 -0
  69. package/components/MemberMain.vue +459 -0
  70. package/components/NFC/NFCPatrolReportMain.vue +591 -0
  71. package/components/NFC/NFCPatrolRouteForm.vue +596 -0
  72. package/components/NFC/NFCPatrolRouteMain.vue +539 -0
  73. package/components/NFC/NFCTagForm.vue +236 -0
  74. package/components/NFC/NFCTagMain.vue +337 -0
  75. package/components/NFC/PatrolSettings.vue +130 -0
  76. package/components/NavigationItem.vue +83 -0
  77. package/components/NumberSettingField.vue +107 -0
  78. package/components/OnlineFormConfigurationForm.vue +290 -0
  79. package/components/OnlineFormsConfiguration.vue +429 -0
  80. package/components/PeopleForm.vue +452 -0
  81. package/components/PlaceholderComponent.vue +34 -0
  82. package/components/RolePermissionFormCreate.vue +161 -0
  83. package/components/RolePermissionFormPreviewUpdate.vue +183 -0
  84. package/components/RolePermissionMain.vue +361 -0
  85. package/components/SearchVehicleNumberUser.vue +91 -0
  86. package/components/ServiceProviderFormCreate.vue +154 -0
  87. package/components/ServiceProviderMain.vue +547 -0
  88. package/components/SignaturePad.vue +73 -0
  89. package/components/Snackbar.vue +23 -0
  90. package/components/SpecificAttr.vue +53 -0
  91. package/components/SupplyManagement.vue +292 -0
  92. package/components/SwitchContext.vue +108 -0
  93. package/components/TableList.vue +150 -0
  94. package/components/TableListSecondary.vue +164 -0
  95. package/components/TableMain.vue +142 -0
  96. package/components/TableWithButton.vue +94 -0
  97. package/components/VehicleUpdateMoreAction.vue +84 -0
  98. package/components/VideoPlayer.vue +125 -0
  99. package/components/VisitorForm.vue +659 -0
  100. package/components/VisitorFormSelection.vue +53 -0
  101. package/components/VisitorManagement.vue +490 -0
  102. package/components/WorkOrder/Create.vue +284 -0
  103. package/components/WorkOrder/Detail.vue +71 -0
  104. package/components/WorkOrder/ListView.vue +96 -0
  105. package/components/WorkOrder/Main.vue +489 -0
  106. package/components/Workorder.vue +1 -0
  107. package/composables/useAddress.ts +107 -0
  108. package/composables/useBuilding.ts +250 -0
  109. package/composables/useBuildingUnit.ts +116 -0
  110. package/composables/useCard.ts +46 -0
  111. package/composables/useCommonPermission.ts +207 -0
  112. package/composables/useCustomer.ts +113 -0
  113. package/composables/useCustomerSite.ts +56 -0
  114. package/composables/useDashboard.ts +31 -0
  115. package/composables/useDashboardData.ts +425 -0
  116. package/composables/useDocument.ts +57 -0
  117. package/composables/useFacility.ts +246 -0
  118. package/composables/useFeedback.ts +119 -0
  119. package/composables/useFile.ts +55 -0
  120. package/composables/useInvoice.ts +18 -0
  121. package/composables/useLocal.ts +131 -0
  122. package/composables/useLocalAuth.ts +137 -0
  123. package/composables/useLocalSetup.ts +13 -0
  124. package/composables/useMember.ts +111 -0
  125. package/composables/useNFCPatrolRoute.ts +77 -0
  126. package/composables/useNFCPatrolSettings.ts +19 -0
  127. package/composables/useNFCPatrolTag.ts +53 -0
  128. package/composables/useOnlineForm.ts +67 -0
  129. package/composables/useOrg.ts +129 -0
  130. package/composables/usePDFDownload.ts +25 -0
  131. package/composables/usePaymentMethod.ts +101 -0
  132. package/composables/usePeople.ts +81 -0
  133. package/composables/usePermission.ts +54 -0
  134. package/composables/usePhoneCountries.ts +561 -0
  135. package/composables/usePrice.ts +15 -0
  136. package/composables/usePromoCode.ts +36 -0
  137. package/composables/useRecapPermission.ts +26 -0
  138. package/composables/useRole.ts +104 -0
  139. package/composables/useSecurityUtils.ts +18 -0
  140. package/composables/useServiceProvider.ts +224 -0
  141. package/composables/useSite.ts +109 -0
  142. package/composables/useSiteEntryPassSettings.ts +46 -0
  143. package/composables/useSiteSettings.ts +123 -0
  144. package/composables/useSubscription.ts +150 -0
  145. package/composables/useUser.ts +132 -0
  146. package/composables/useUtils.ts +445 -0
  147. package/composables/useVerification.ts +34 -0
  148. package/composables/useVisitor.ts +120 -0
  149. package/composables/useWorkOrder.ts +85 -0
  150. package/error.vue +41 -0
  151. package/layouts/plain.vue +7 -0
  152. package/middleware/01.auth.ts +20 -0
  153. package/middleware/02.org.ts +21 -0
  154. package/middleware/03.customer.ts +13 -0
  155. package/middleware/member.ts +4 -0
  156. package/nuxt.config.ts +54 -0
  157. package/package.json +39 -0
  158. package/pages/index.vue +3 -0
  159. package/pages/payment-method-linked.vue +31 -0
  160. package/pages/require-customer.vue +56 -0
  161. package/pages/require-organization-membership.vue +47 -0
  162. package/pages/unauthorized.vue +29 -0
  163. package/plugins/API.ts +21 -0
  164. package/plugins/iconify.client.ts +5 -0
  165. package/plugins/secure-member.client.ts +86 -0
  166. package/plugins/vuetify.ts +62 -0
  167. package/public/bg-camera.jpg +0 -0
  168. package/public/bg-city.jpg +0 -0
  169. package/public/bg-condo.jpg +0 -0
  170. package/public/images/icons/delete-icon.png +0 -0
  171. package/public/sprite.svg +1 -0
  172. package/tsconfig.json +3 -0
  173. package/types/address.d.ts +13 -0
  174. package/types/building.d.ts +27 -0
  175. package/types/camera.d.ts +31 -0
  176. package/types/card.d.ts +22 -0
  177. package/types/customer.d.ts +27 -0
  178. package/types/document.d.ts +6 -0
  179. package/types/feedback.d.ts +68 -0
  180. package/types/local.d.ts +74 -0
  181. package/types/member.d.ts +21 -0
  182. package/types/online-form.d.ts +15 -0
  183. package/types/org.d.ts +13 -0
  184. package/types/people.d.ts +24 -0
  185. package/types/permission.d.ts +25 -0
  186. package/types/phone-number.d.ts +10 -0
  187. package/types/price.d.ts +17 -0
  188. package/types/promo-code.d.ts +19 -0
  189. package/types/role.d.ts +11 -0
  190. package/types/select.d.ts +4 -0
  191. package/types/service-provider.d.ts +15 -0
  192. package/types/site.d.ts +20 -0
  193. package/types/subscription.d.ts +23 -0
  194. package/types/user.d.ts +19 -0
  195. package/types/verification.d.ts +20 -0
  196. package/types/visitor.d.ts +42 -0
  197. package/types/work-order.d.ts +42 -0
  198. package/utils/phoneMasks.ts +1703 -0
@@ -0,0 +1,250 @@
1
+ export default function useBuilding() {
2
+ const categories = ref([
3
+ {
4
+ title: "Academic Spaces",
5
+ value: "academic-spaces",
6
+ },
7
+ {
8
+ title: "Support Facilities",
9
+ value: "support-facilities",
10
+ },
11
+ {
12
+ title: "Activity & Recreation Areas",
13
+ value: "activity-recreation-areas",
14
+ },
15
+ {
16
+ title: "Utility & Sanitary",
17
+ value: "utility-sanitary",
18
+ },
19
+ {
20
+ title: "Dormitories & Lodging",
21
+ value: "dormitories-lodging",
22
+ },
23
+ ]);
24
+
25
+ const types = ref([
26
+ {
27
+ title: "Classroom",
28
+ value: "classroom",
29
+ category: "academic-spaces",
30
+ subtitle: "Standard teaching room",
31
+ },
32
+ {
33
+ title: "Laboratory",
34
+ value: "laboratory",
35
+ category: "academic-spaces",
36
+ subtitle: "Science, computer, or language labs",
37
+ },
38
+ {
39
+ title: "Library",
40
+ value: "library",
41
+ category: "academic-spaces",
42
+ subtitle: "Reading and study area",
43
+ },
44
+ {
45
+ title: "Faculty Room",
46
+ value: "faculty_room",
47
+ category: "academic-spaces",
48
+ subtitle: "Shared working space for teachers",
49
+ },
50
+ {
51
+ title: "Lecture Hall",
52
+ value: "lecture_hall",
53
+ category: "academic-spaces",
54
+ subtitle: "Large room for lectures",
55
+ },
56
+ {
57
+ title: "Tutorial Room",
58
+ value: "tutorial_room",
59
+ category: "academic-spaces",
60
+ subtitle: "Small group learning or mentoring",
61
+ },
62
+ {
63
+ title: "Exam Room",
64
+ value: "exam_room",
65
+ category: "academic-spaces",
66
+ subtitle: "Designated exam space",
67
+ },
68
+ {
69
+ title: "Office",
70
+ value: "office",
71
+ category: "support-facilities",
72
+ subtitle: "Admin, registrar, finance, principal's office",
73
+ },
74
+ {
75
+ title: "Clinic",
76
+ value: "clinic",
77
+ category: "support-facilities",
78
+ subtitle: "School nurse or medical emergency room",
79
+ },
80
+ {
81
+ title: "Storage",
82
+ value: "storage",
83
+ category: "support-facilities",
84
+ subtitle: "For site supplies, janitorial, or equipment",
85
+ },
86
+ {
87
+ title: "Server Room",
88
+ value: "server_room",
89
+ category: "support-facilities",
90
+ subtitle: "For IT infrastructure",
91
+ },
92
+ {
93
+ title: "Equipment Room",
94
+ value: "equipment_room",
95
+ category: "support-facilities",
96
+ subtitle: "PE or technical equipment",
97
+ },
98
+ {
99
+ title: "Gymnasium",
100
+ value: "gymnasium",
101
+ category: "activity-recreation-areas",
102
+ subtitle: "Indoor sports",
103
+ },
104
+ {
105
+ title: "Sports Area",
106
+ value: "sports_area",
107
+ category: "activity-recreation-areas",
108
+ subtitle: "Outdoor field or court",
109
+ },
110
+ {
111
+ title: "Music Room",
112
+ value: "music_room",
113
+ category: "activity-recreation-areas",
114
+ subtitle: "For music classes or practice",
115
+ },
116
+ {
117
+ title: "Art Room",
118
+ value: "art_room",
119
+ category: "activity-recreation-areas",
120
+ subtitle: "Visual arts room",
121
+ },
122
+ {
123
+ title: "Theater",
124
+ value: "theater",
125
+ category: "activity-recreation-areas",
126
+ subtitle: "Stage and performance space",
127
+ },
128
+ {
129
+ title: "Canteen",
130
+ value: "canteen",
131
+ category: "activity-recreation-areas",
132
+ subtitle: "Food service area",
133
+ },
134
+ {
135
+ title: "Toilet",
136
+ value: "toilet",
137
+ category: "utility-sanitary",
138
+ subtitle: "Restroom facilities",
139
+ },
140
+ {
141
+ title: "Shower Room",
142
+ value: "shower_room",
143
+ category: "utility-sanitary",
144
+ subtitle: "Common in dorms or gyms",
145
+ },
146
+ {
147
+ title: "Janitor Room",
148
+ value: "janitor_room",
149
+ category: "utility-sanitary",
150
+ subtitle: "Cleaning supplies, mop sinks",
151
+ },
152
+ {
153
+ title: "Mechanical Room",
154
+ value: "mechanical_room",
155
+ category: "utility-sanitary",
156
+ subtitle: "Electrical, HVAC, plumbing systems",
157
+ },
158
+ {
159
+ title: "Dorm Room",
160
+ value: "dorm_room",
161
+ category: "dormitories-lodging",
162
+ subtitle: "Sleeping quarters",
163
+ },
164
+ {
165
+ title: "Common Room",
166
+ value: "common_room",
167
+ category: "dormitories-lodging",
168
+ subtitle: "Lounge or social area",
169
+ },
170
+ {
171
+ title: "Laundry",
172
+ value: "laundry",
173
+ category: "dormitories-lodging",
174
+ subtitle: "Washing facilities",
175
+ },
176
+ ]);
177
+
178
+ function getAll({
179
+ page = 1,
180
+ search = "",
181
+ limit = 20,
182
+ status = "active",
183
+ site = "",
184
+ } = {}) {
185
+ return useNuxtApp().$api<Record<string, any>>("/api/buildings", {
186
+ method: "GET",
187
+ query: {
188
+ page,
189
+ search,
190
+ limit,
191
+ status,
192
+ site,
193
+ },
194
+ });
195
+ }
196
+
197
+ function getById(id = "") {
198
+ return useNuxtApp().$api<Record<string, any>>(`/api/buildings/id/${id}`, {
199
+ method: "GET",
200
+ });
201
+ }
202
+
203
+ function getByName(name = "") {
204
+ return useNuxtApp().$api(`/api/buildings/name/${name}`, {
205
+ method: "GET",
206
+ });
207
+ }
208
+
209
+ function createBuilding(data: TBuilding) {
210
+ return useNuxtApp().$api("/api/buildings", {
211
+ method: "POST",
212
+ body: data,
213
+ });
214
+ }
215
+
216
+ function updateBuildingField(id: string, field: string, value: string) {
217
+ return useNuxtApp().$api(`/api/buildings/${id}`, {
218
+ method: "PATCH",
219
+ body: { field, value },
220
+ });
221
+ }
222
+
223
+ function updateById(
224
+ id: string,
225
+ data: Pick<TBuilding, "name" | "block" | "levels" | "buildingFloorPlan">
226
+ ) {
227
+ return useNuxtApp().$api(`/api/buildings/id/${id}`, {
228
+ method: "PATCH",
229
+ body: data,
230
+ });
231
+ }
232
+
233
+ function deleteById(id: string) {
234
+ return useNuxtApp().$api(`/api/buildings/id/${id}`, {
235
+ method: "DELETE",
236
+ });
237
+ }
238
+
239
+ return {
240
+ categories,
241
+ types,
242
+ getAll,
243
+ getById,
244
+ getByName,
245
+ createBuilding,
246
+ updateBuildingField,
247
+ deleteById,
248
+ updateById,
249
+ };
250
+ }
@@ -0,0 +1,116 @@
1
+ export default function useBuildingUnit() {
2
+ const categories = ref([
3
+ {
4
+ title: "Management",
5
+ value: "management",
6
+ },
7
+ {
8
+ title: "Residential",
9
+ value: "residential",
10
+ },
11
+ {
12
+ title: "Commercial",
13
+ value: "commercial",
14
+ },
15
+ {
16
+ title: "Amenities",
17
+ value: "amenities",
18
+ },
19
+ ]);
20
+
21
+ function getAll({
22
+ page = 1,
23
+ search = "",
24
+ limit = 20,
25
+ status = "active",
26
+ site = "",
27
+ } = {}) {
28
+ return useNuxtApp().$api<Record<string, any>>("/api/building-units", {
29
+ method: "GET",
30
+ query: {
31
+ page,
32
+ search,
33
+ limit,
34
+ status,
35
+ site,
36
+ },
37
+ });
38
+ }
39
+
40
+ function getAllUnits({
41
+ page = 1,
42
+ search = "",
43
+ limit = 20,
44
+ status = "active",
45
+ site = "",
46
+ building = "",
47
+ } = {}) {
48
+ return useNuxtApp().$api<Record<string, any>>("/api/building-units", {
49
+ method: "GET",
50
+ query: {
51
+ page,
52
+ search,
53
+ limit,
54
+ status,
55
+ site,
56
+ building,
57
+ },
58
+ });
59
+ }
60
+
61
+ function getById(id = "") {
62
+ return useNuxtApp().$api<Record<string, any>>(
63
+ `/api/building-units/id/${id}`,
64
+ {
65
+ method: "GET",
66
+ }
67
+ );
68
+ }
69
+
70
+ function getByName(name = "") {
71
+ return useNuxtApp().$api(`/api/building-units/name/${name}`, {
72
+ method: "GET",
73
+ });
74
+ }
75
+
76
+ function add(data: { labels: string[]; unit: TBuildingUnit; qty?: number }) {
77
+ return useNuxtApp().$api("/api/building-units", {
78
+ method: "POST",
79
+ body: data,
80
+ });
81
+ }
82
+
83
+ type TUpdateOption = Pick<TBuildingUnit, "name" | "category" | "level">;
84
+
85
+ function updateById(id: string, value: TUpdateOption) {
86
+ return useNuxtApp().$api(`/api/building-units/id/${id}`, {
87
+ method: "PATCH",
88
+ body: value,
89
+ });
90
+ }
91
+
92
+ function deleteById(id: string) {
93
+ return useNuxtApp().$api(`/api/building-units/id/${id}`, {
94
+ method: "DELETE",
95
+ });
96
+ }
97
+
98
+ const region = ref({
99
+ _id: "",
100
+ name: "",
101
+ director: "",
102
+ directorName: "",
103
+ });
104
+
105
+ return {
106
+ categories,
107
+ region,
108
+ getAll,
109
+ getById,
110
+ getByName,
111
+ add,
112
+ updateById,
113
+ deleteById,
114
+ getAllUnits,
115
+ };
116
+ }
@@ -0,0 +1,46 @@
1
+ export default function useCard() {
2
+ function getAll({
3
+ page = 1,
4
+ search = "",
5
+ limit = 10,
6
+ status = "active",
7
+ site = "",
8
+ } = {}) {
9
+ return useNuxtApp().$api<Record<string, any>>(`/api/cards`, {
10
+ method: "GET",
11
+ query: {
12
+ page,
13
+ search,
14
+ limit,
15
+ status,
16
+ site,
17
+ },
18
+ });
19
+ }
20
+ function add(value: any) {
21
+ return useNuxtApp().$api<Record<string, any>>("/api/cards", {
22
+ method: "POST",
23
+ body: value,
24
+ });
25
+ }
26
+
27
+ function deleteById(id: string) {
28
+ return useNuxtApp().$api(`/api/cards/${id}`, {
29
+ method: "DELETE",
30
+ });
31
+ }
32
+
33
+ function updateById(id: string, value: any) {
34
+ return useNuxtApp().$api(`/api/cards/${id}`, {
35
+ method: "PUT",
36
+ body: value,
37
+ });
38
+ }
39
+
40
+ return {
41
+ getAll,
42
+ add,
43
+ deleteById,
44
+ updateById,
45
+ };
46
+ }
@@ -0,0 +1,207 @@
1
+ export function useCommonPermissions() {
2
+ const invitationPermissions: Record<string, TPermission> = {
3
+ "create-invitation": {
4
+ check: true,
5
+ description:
6
+ "Allows the user to create a new invitation for a invitation to join the organization.",
7
+ },
8
+ "view-invitations": {
9
+ check: true,
10
+ description:
11
+ "Allows the user to view the list of all invitation in the organization.",
12
+ },
13
+ "cancel-invitation": {
14
+ check: true,
15
+ description:
16
+ "Allows the user to permanently remove a invitation from the organization.",
17
+ },
18
+ };
19
+
20
+ const memberPermissions: Record<string, TPermission> = {
21
+ "view-members": {
22
+ check: true,
23
+ description:
24
+ "Allows the user to view the list of all members in the organization.",
25
+ },
26
+ "assign-member-role": {
27
+ check: true,
28
+ description:
29
+ "Allows the user to assign a specific role to a member in the organization.",
30
+ },
31
+ "suspend-member": {
32
+ check: true,
33
+ description: "Allows the user to suspend a member's account temporarily.",
34
+ },
35
+ "activate-member": {
36
+ check: true,
37
+ description:
38
+ "Allows the user to reactivate a suspended member's account.",
39
+ },
40
+ "delete-member": {
41
+ check: true,
42
+ description:
43
+ "Allows the user to permanently remove a member from the organization.",
44
+ },
45
+ };
46
+
47
+ const rolePermissions: Record<string, TPermission> = {
48
+ "add-role": {
49
+ check: true,
50
+ description: "Allows the user to add a new role to the system.",
51
+ },
52
+ "see-all-roles": {
53
+ check: true,
54
+ description: "Allows the user to view the list of all roles.",
55
+ },
56
+ "see-role-details": {
57
+ check: true,
58
+ description: "Allows the user to view the details of a specific role.",
59
+ },
60
+ "delete-role": {
61
+ check: true,
62
+ description:
63
+ "Allows the user to remove a role from the system permanently.",
64
+ },
65
+ "update-role": {
66
+ check: true,
67
+ description: "Allows the user to update the details of an existing role.",
68
+ },
69
+ };
70
+
71
+ const feedbackPermissions: Record<string, TPermission> = {
72
+ "add-feedback": {
73
+ check: true,
74
+ description: "Allows the user to create a new feedback.",
75
+ },
76
+ "see-all-feedback": {
77
+ check: true,
78
+ description: "Allows the user to view the list of all feedback.",
79
+ },
80
+ "see-feedback-details": {
81
+ check: true,
82
+ description:
83
+ "Allows the user to view the details of a specific feedback.",
84
+ },
85
+ "delete-feedback": {
86
+ check: true,
87
+ description:
88
+ "Allows the user to remove a feedback from the system permanently.",
89
+ },
90
+ "update-feedback": {
91
+ check: true,
92
+ description:
93
+ "Allows the user to update the details of an existing feedback.",
94
+ },
95
+ };
96
+
97
+ const workOrderPermissions: Record<string, TPermission> = {
98
+ "create-work-order": {
99
+ check: true,
100
+ description: "Allows the user to create a new work order.",
101
+ },
102
+ "see-all-work-orders": {
103
+ check: true,
104
+ description: "Allows the user to view the list of all work orders.",
105
+ },
106
+ "see-work-order-details": {
107
+ check: true,
108
+ description:
109
+ "Allows the user to view the details of a specific work order.",
110
+ },
111
+ "delete-work-order": {
112
+ check: true,
113
+ description:
114
+ "Allows the user to remove a work order from the system permanently.",
115
+ },
116
+ "update-work-order": {
117
+ check: true,
118
+ description:
119
+ "Allows the user to update the details of an existing work order.",
120
+ },
121
+ };
122
+
123
+ const visitorManagementPermissions: Record<string, TPermission> = {
124
+ "add-visitor": {
125
+ check: true,
126
+ description: "Allows the user to add a new visitor to the system.",
127
+ },
128
+ "see-all-visitor": {
129
+ check: true,
130
+ description: "Allows the user to view the list of all visitors.",
131
+ },
132
+ "see-visitor-details": {
133
+ check: true,
134
+ description: "Allows the user to view the details of a specific visitor.",
135
+ },
136
+ "update-visitor": {
137
+ check: true,
138
+ description: "Allows the user to update visitor details.",
139
+ },
140
+ "delete-visitor": {
141
+ check: true,
142
+ description:
143
+ "Allows the user to remove a visitor from the system permanently.",
144
+ },
145
+ };
146
+
147
+ const buildingManagementPermissions: Record<string, TPermission> = {
148
+ "add-building": {
149
+ check: true,
150
+ description: "Allows the user to add a new building to the system.",
151
+ },
152
+ "see-all-buildings": {
153
+ check: true,
154
+ description: "Allows the user to view the list of all buildings.",
155
+ },
156
+ "see-building-details": {
157
+ check: true,
158
+ description:
159
+ "Allows the user to view the details of a specific building.",
160
+ },
161
+ "update-building": {
162
+ check: true,
163
+ description: "Allows the user to update building details.",
164
+ },
165
+ "delete-building": {
166
+ check: true,
167
+ description:
168
+ "Allows the user to remove a building from the system permanently.",
169
+ },
170
+ };
171
+
172
+ const buildingUnitManagementPermissions: Record<string, TPermission> = {
173
+ "add-building-unit": {
174
+ check: true,
175
+ description: "Allows the user to add a new building unit to the system.",
176
+ },
177
+ "see-all-building-units": {
178
+ check: true,
179
+ description: "Allows the user to view the list of all building units.",
180
+ },
181
+ "see-building-unit-details": {
182
+ check: true,
183
+ description:
184
+ "Allows the user to view the details of a specific building unit.",
185
+ },
186
+ "update-building-unit": {
187
+ check: true,
188
+ description: "Allows the user to update building unit details.",
189
+ },
190
+ "delete-building-unit": {
191
+ check: true,
192
+ description:
193
+ "Allows the user to remove a building unit from the system permanently.",
194
+ },
195
+ };
196
+
197
+ return {
198
+ invitationPermissions,
199
+ memberPermissions,
200
+ rolePermissions,
201
+ feedbackPermissions,
202
+ workOrderPermissions,
203
+ visitorManagementPermissions,
204
+ buildingManagementPermissions,
205
+ buildingUnitManagementPermissions
206
+ };
207
+ }