@iservice365/layer-common 0.1.0 → 0.2.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/.playground/app.vue +7 -2
- package/.playground/pages/feedback.vue +30 -0
- package/CHANGELOG.md +12 -0
- package/components/Chat/Bubbles.vue +53 -0
- package/components/Chat/Information.vue +187 -0
- package/components/Chat/ListCard.vue +62 -0
- package/components/Chat/Message.vue +149 -0
- package/components/Chat/Navigation.vue +150 -0
- package/components/ConfirmDialog.vue +66 -0
- package/components/Container/Standard.vue +33 -0
- package/components/Feedback/Form.vue +136 -0
- package/components/FeedbackDetail.vue +465 -0
- package/components/FeedbackMain.vue +454 -0
- package/components/FormDialog.vue +65 -0
- package/components/Input/File.vue +203 -0
- package/components/Input/ListGroupSelection.vue +96 -0
- package/components/Input/NewDate.vue +123 -0
- package/components/Input/Number.vue +124 -0
- package/components/InvitationMain.vue +284 -0
- package/components/Layout/Header.vue +14 -4
- package/components/ListView.vue +87 -0
- package/components/MemberMain.vue +459 -0
- package/components/RolePermissionFormCreate.vue +161 -0
- package/components/RolePermissionFormPreviewUpdate.vue +183 -0
- package/components/RolePermissionMain.vue +361 -0
- package/components/ServiceProviderFormCreate.vue +154 -0
- package/components/ServiceProviderMain.vue +195 -0
- package/components/SignaturePad.vue +73 -0
- package/components/SpecificAttr.vue +53 -0
- package/components/SwitchContext.vue +26 -5
- package/components/TableList.vue +150 -0
- package/components/TableListSecondary.vue +164 -0
- package/components/WorkOrder/Create.vue +197 -0
- package/components/WorkOrder/ListView.vue +96 -0
- package/components/WorkOrder/Main.vue +308 -0
- package/components/Workorder.vue +1 -0
- package/composables/useAddress.ts +107 -0
- package/composables/useCommonPermission.ts +130 -0
- package/composables/useCustomer.ts +113 -0
- package/composables/useFeedback.ts +117 -0
- package/composables/useFile.ts +40 -0
- package/composables/useInvoice.ts +18 -0
- package/composables/useLocal.ts +24 -4
- package/composables/useLocalAuth.ts +62 -20
- package/composables/useLocalSetup.ts +13 -0
- package/composables/useMember.ts +111 -0
- package/composables/useOrg.ts +76 -92
- package/composables/usePaymentMethod.ts +101 -0
- package/composables/usePrice.ts +15 -0
- package/composables/usePromoCode.ts +36 -0
- package/composables/useRole.ts +38 -7
- package/composables/useServiceProvider.ts +218 -0
- package/composables/useSite.ts +108 -0
- package/composables/useSubscription.ts +149 -0
- package/composables/useUser.ts +38 -14
- package/composables/useUtils.ts +218 -6
- package/composables/useVerification.ts +33 -0
- package/composables/useWorkOrder.ts +68 -0
- package/middleware/01.auth.ts +11 -0
- package/middleware/02.org.ts +18 -0
- package/middleware/03.customer.ts +13 -0
- package/middleware/member.ts +4 -0
- package/nuxt.config.ts +3 -1
- package/package.json +7 -3
- package/pages/index.vue +3 -0
- package/pages/payment-method-linked.vue +31 -0
- package/pages/require-customer.vue +56 -0
- package/pages/require-organization-membership.vue +47 -0
- package/pages/unauthorized.vue +29 -0
- package/plugins/API.ts +2 -25
- package/plugins/iconify.client.ts +5 -0
- package/plugins/secure-member.client.ts +54 -0
- package/plugins/vuetify.ts +2 -0
- package/public/bg-camera.jpg +0 -0
- package/public/bg-city.jpg +0 -0
- package/public/bg-condo.jpg +0 -0
- package/public/images/icons/delete-icon.png +0 -0
- package/public/sprite.svg +1 -0
- package/types/address.d.ts +13 -0
- package/types/customer.d.ts +15 -0
- package/types/feedback.d.ts +63 -0
- package/types/local.d.ts +47 -38
- package/types/member.d.ts +21 -0
- package/types/org.d.ts +13 -0
- package/types/permission.d.ts +1 -0
- package/types/price.d.ts +17 -0
- package/types/promo-code.d.ts +19 -0
- package/types/service-provider.d.ts +15 -0
- package/types/site.d.ts +13 -0
- package/types/subscription.d.ts +23 -0
- package/types/user.d.ts +19 -0
- package/types/verification.d.ts +20 -0
- package/types/work-order.d.ts +40 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type TCustomer = {
|
|
2
|
+
_id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
customerOrgId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
siteName?: string;
|
|
9
|
+
siteDescription?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type TCustomerCreate = Pick<
|
|
13
|
+
TCustomer,
|
|
14
|
+
"name" | "orgId" | "siteName" | "siteDescription"
|
|
15
|
+
>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare type TFeedback = {
|
|
2
|
+
_id: string;
|
|
3
|
+
attachments?: string[];
|
|
4
|
+
category: string;
|
|
5
|
+
subject: string;
|
|
6
|
+
location: string;
|
|
7
|
+
description: string;
|
|
8
|
+
createdBy: string;
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
updatedAt?: string;
|
|
11
|
+
status?: string;
|
|
12
|
+
metadata?: TFeedbackMetadata;
|
|
13
|
+
createdByName?: string;
|
|
14
|
+
organization?: string;
|
|
15
|
+
site?: string;
|
|
16
|
+
signature?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
highPriority?: boolean;
|
|
19
|
+
serviceProvider?: string;
|
|
20
|
+
assignee?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare type TFeedbackMetadata = {
|
|
24
|
+
serviceProvider: string;
|
|
25
|
+
assignee: string;
|
|
26
|
+
organization: string;
|
|
27
|
+
site: string;
|
|
28
|
+
name: string;
|
|
29
|
+
signature: string;
|
|
30
|
+
attachments: string;
|
|
31
|
+
completedAt: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
declare type TFeedbackCreate = Pick<
|
|
35
|
+
TFeedback,
|
|
36
|
+
| "subject"
|
|
37
|
+
| "category"
|
|
38
|
+
| "location"
|
|
39
|
+
| "description"
|
|
40
|
+
| "attachments"
|
|
41
|
+
| "highPriority"
|
|
42
|
+
| "serviceProvider"
|
|
43
|
+
| "assignee"
|
|
44
|
+
| "organization"
|
|
45
|
+
| "site"
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
declare type TFeedbackUpdate = Pick<
|
|
49
|
+
TFeedback,
|
|
50
|
+
"subject" | "category" | "location" | "description" | "attachments"
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
declare type TFeedbackUpdate = Pick<
|
|
54
|
+
TFeedback,
|
|
55
|
+
"attachments" | "category" | "subject" | "location" | "description"
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
declare type TFeedbackStatusComplete = Pick<
|
|
59
|
+
TFeedback,
|
|
60
|
+
"status" | "name" | "signature" | "attachments"
|
|
61
|
+
>;
|
|
62
|
+
|
|
63
|
+
declare type TFeedbackUpdateStatus = Pick<TFeedback, "status">;
|
package/types/local.d.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
declare type TUser = {
|
|
2
|
-
_id: string;
|
|
3
|
-
email: string;
|
|
4
|
-
password: string;
|
|
5
|
-
firstName: string;
|
|
6
|
-
middleName?: string;
|
|
7
|
-
lastName: string;
|
|
8
|
-
suffix?: string;
|
|
9
|
-
birthMonth?: string;
|
|
10
|
-
birthDate?: string;
|
|
11
|
-
birthYear?: string;
|
|
12
|
-
profile?: string;
|
|
13
|
-
defaultOrg?: string;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
|
-
status: string;
|
|
17
|
-
deletedAt: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
1
|
declare type TToken = {
|
|
21
2
|
accessToken: string;
|
|
22
3
|
refreshToken: string;
|
|
@@ -32,21 +13,8 @@ declare type TNavigationItem = {
|
|
|
32
13
|
title: string;
|
|
33
14
|
icon?: string;
|
|
34
15
|
route?: TNavigationRoute;
|
|
35
|
-
link?: string;
|
|
36
16
|
children?: TNavigationItem[];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
declare type TOrg = {
|
|
40
|
-
_id?: string;
|
|
41
|
-
name: string;
|
|
42
|
-
email: string;
|
|
43
|
-
busInst: string;
|
|
44
|
-
owner: string;
|
|
45
|
-
type: string;
|
|
46
|
-
createdAt?: string;
|
|
47
|
-
updatedAt?: string;
|
|
48
|
-
status?: string;
|
|
49
|
-
deletedAt?: string;
|
|
17
|
+
link?: string
|
|
50
18
|
};
|
|
51
19
|
|
|
52
20
|
declare type TKeyValuePair<
|
|
@@ -56,9 +24,50 @@ declare type TKeyValuePair<
|
|
|
56
24
|
[key in K]: V;
|
|
57
25
|
};
|
|
58
26
|
|
|
59
|
-
declare type
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
27
|
+
declare type TFeedbackPaginatedResponse = {
|
|
28
|
+
items: TFeedback[];
|
|
29
|
+
totalItems: number;
|
|
30
|
+
page: number;
|
|
31
|
+
pages: number;
|
|
32
|
+
pageRange: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare type TCustomerPaginatedResponse = {
|
|
36
|
+
items: TCustomer[];
|
|
37
|
+
totalItems: number;
|
|
38
|
+
page: number;
|
|
39
|
+
pages: number;
|
|
40
|
+
pageRange: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare type TSitePaginatedResponse = {
|
|
44
|
+
items: TSite[];
|
|
45
|
+
totalItems: number;
|
|
46
|
+
page: number;
|
|
47
|
+
pages: number;
|
|
48
|
+
pageRange: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare type TServiceProviderPaginatedResponse = {
|
|
52
|
+
items: TServiceProvider[];
|
|
53
|
+
totalItems: number;
|
|
54
|
+
page: number;
|
|
55
|
+
pages: number;
|
|
56
|
+
pageRange: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare type TWorkOrderPaginatedResponse = {
|
|
60
|
+
items: TWorkOrder[];
|
|
61
|
+
totalItems: number;
|
|
62
|
+
page: number;
|
|
63
|
+
pages: number;
|
|
64
|
+
pageRange: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
declare type TMemberPaginatedResponse = {
|
|
68
|
+
items: TMember[];
|
|
69
|
+
totalItems: number;
|
|
70
|
+
page: number;
|
|
71
|
+
pages: number;
|
|
72
|
+
pageRange: string;
|
|
64
73
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare type TMember = {
|
|
2
|
+
_id: string;
|
|
3
|
+
org?: string;
|
|
4
|
+
orgName?: string;
|
|
5
|
+
roleName?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
user: string;
|
|
8
|
+
role: string;
|
|
9
|
+
type: string;
|
|
10
|
+
customerOrgId?: string;
|
|
11
|
+
customerSiteId?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
updatedAt?: string;
|
|
15
|
+
deletedAt?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type TMemberUserCreateVerification = Pick<
|
|
19
|
+
TUser,
|
|
20
|
+
"name" | "password" | "type"
|
|
21
|
+
>;
|
package/types/org.d.ts
ADDED
package/types/permission.d.ts
CHANGED
package/types/price.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare type TPriceType =
|
|
2
|
+
| "monthly-subscription"
|
|
3
|
+
| "yearly-subscription"
|
|
4
|
+
| "one-time-payment"
|
|
5
|
+
| "other";
|
|
6
|
+
|
|
7
|
+
declare type TPrice = {
|
|
8
|
+
_id?: string;
|
|
9
|
+
value: number;
|
|
10
|
+
saleValue?: number;
|
|
11
|
+
saleExpiry?: Date;
|
|
12
|
+
name: string;
|
|
13
|
+
type?: TPriceType;
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
updatedAt?: Date;
|
|
16
|
+
deletedAt?: Date;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare type TPromoTier = {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
price: number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
declare type TPromoCode = {
|
|
8
|
+
_id?: ObjectId;
|
|
9
|
+
code: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
type: "tiered" | "fixed";
|
|
12
|
+
tiers?: TPromoTier[];
|
|
13
|
+
fixed_rate?: number;
|
|
14
|
+
appliesTo?: string; // "subscription" | "order"
|
|
15
|
+
createdAt?: string; // Date of creation
|
|
16
|
+
expiresAt?: string; // Optional expiry
|
|
17
|
+
assignedTo?: string | ObjectId; // Store the only ape who used it
|
|
18
|
+
status?: "active" | "expired" | "disabled";
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type TServiceProvider = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
customerOrgId: string;
|
|
6
|
+
siteId: string;
|
|
7
|
+
serviceProviderOrgId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
nature: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type TServiceProviderName = {
|
|
13
|
+
_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
package/types/site.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare type TSite = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
orgId: string;
|
|
6
|
+
customerOrgId: string;
|
|
7
|
+
customerSiteId: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
deletedAt?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare type TSiteCreate = Pick<TSite, "name" | "description" | "orgId">;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare type TSubscription = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
user?: string;
|
|
4
|
+
org?: string;
|
|
5
|
+
customerId: string;
|
|
6
|
+
paymentMethodId: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
description?: string;
|
|
9
|
+
currency: string;
|
|
10
|
+
promoCode?: string;
|
|
11
|
+
type: string;
|
|
12
|
+
paidSeats?: number;
|
|
13
|
+
currentSeats?: number;
|
|
14
|
+
maxSeats?: number;
|
|
15
|
+
status?: string;
|
|
16
|
+
billingCycle: "monthly" | "yearly";
|
|
17
|
+
nextBillingDate?: string;
|
|
18
|
+
lastPaymentStatus?: string;
|
|
19
|
+
failedAttempts?: number;
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
updatedAt?: string;
|
|
22
|
+
deletedAt?: string;
|
|
23
|
+
};
|
package/types/user.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare type TUser = {
|
|
2
|
+
_id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
name: string;
|
|
6
|
+
suffix?: string;
|
|
7
|
+
month?: string;
|
|
8
|
+
day?: number;
|
|
9
|
+
year?: number;
|
|
10
|
+
profile?: string;
|
|
11
|
+
defaultOrg: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
status: string;
|
|
15
|
+
deletedAt: string;
|
|
16
|
+
gender: string;
|
|
17
|
+
contact: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type TVerificationMetadata = {
|
|
2
|
+
app?: string;
|
|
3
|
+
role?: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
declare type TMiniVerification = Pick<
|
|
7
|
+
TVerification,
|
|
8
|
+
"createdAt" | "email" | "_id"
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
declare type TVerification = {
|
|
12
|
+
_id: string;
|
|
13
|
+
type: string;
|
|
14
|
+
email: string;
|
|
15
|
+
metadata?: TVerificationMetadata;
|
|
16
|
+
status?: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt?: string | null;
|
|
19
|
+
expireAt: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare type TWorkOrder = {
|
|
2
|
+
_id: string;
|
|
3
|
+
subject: string;
|
|
4
|
+
description: string;
|
|
5
|
+
createdBy: string;
|
|
6
|
+
createdByName?: string;
|
|
7
|
+
service: string;
|
|
8
|
+
provider: string;
|
|
9
|
+
assignee?: string;
|
|
10
|
+
organization: string;
|
|
11
|
+
site: string;
|
|
12
|
+
location: string;
|
|
13
|
+
attachments?: string[];
|
|
14
|
+
feedback?: string;
|
|
15
|
+
status?: string;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
highPriority?: boolean;
|
|
19
|
+
block: string;
|
|
20
|
+
level: string;
|
|
21
|
+
unit: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare type TWorkOrderCreate = Pick<
|
|
25
|
+
TWorkOrder,
|
|
26
|
+
| "subject"
|
|
27
|
+
| "description"
|
|
28
|
+
| "attachments"
|
|
29
|
+
| "location"
|
|
30
|
+
| "organization"
|
|
31
|
+
| "site"
|
|
32
|
+
| "block"
|
|
33
|
+
| "level"
|
|
34
|
+
| "unit"
|
|
35
|
+
| "highPriority"
|
|
36
|
+
| "assignee"
|
|
37
|
+
| "feedback"
|
|
38
|
+
| "category"
|
|
39
|
+
| "serviceProvider"
|
|
40
|
+
>;
|