@goweekdays/layer-core 1.0.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 (60) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/main.yml +19 -0
  4. package/.github/workflows/publish.yml +39 -0
  5. package/CHANGELOG.md +7 -0
  6. package/README.md +75 -0
  7. package/app/app.vue +8 -0
  8. package/app/assets/fonts/ProductSans-Black.ttf +0 -0
  9. package/app/assets/fonts/ProductSans-BlackItalic.ttf +0 -0
  10. package/app/assets/fonts/ProductSans-Bold.ttf +0 -0
  11. package/app/assets/fonts/ProductSans-BoldItalic.ttf +0 -0
  12. package/app/assets/fonts/ProductSans-Italic.ttf +0 -0
  13. package/app/assets/fonts/ProductSans-Light.ttf +0 -0
  14. package/app/assets/fonts/ProductSans-LightItalic.ttf +0 -0
  15. package/app/assets/fonts/ProductSans-Medium.ttf +0 -0
  16. package/app/assets/fonts/ProductSans-MediumItalic.ttf +0 -0
  17. package/app/assets/fonts/ProductSans-Regular.ttf +0 -0
  18. package/app/assets/fonts/ProductSans-Thin.ttf +0 -0
  19. package/app/assets/fonts/ProductSans-ThinItalic.ttf +0 -0
  20. package/app/assets/main.css +10 -0
  21. package/app/assets/settings.scss +89 -0
  22. package/app/components/Input/ListGroupSelection.vue +107 -0
  23. package/app/components/Input/Password.vue +35 -0
  24. package/app/composables/useLocalAuth.ts +131 -0
  25. package/app/composables/useLocalSetup.ts +34 -0
  26. package/app/composables/useMember.ts +100 -0
  27. package/app/composables/useRole.ts +87 -0
  28. package/app/composables/useUtils.ts +308 -0
  29. package/app/layouts/plain.vue +7 -0
  30. package/app/middleware/01.auth.ts +14 -0
  31. package/app/middleware/org.ts +13 -0
  32. package/app/pages/forgot-password.vue +76 -0
  33. package/app/pages/index.vue +3 -0
  34. package/app/pages/login.vue +134 -0
  35. package/app/pages/logout.vue +18 -0
  36. package/app/pages/privacy-policy.vue +23 -0
  37. package/app/pages/refund-policy.vue +23 -0
  38. package/app/pages/sign-up.vue +141 -0
  39. package/app/pages/terms-and-conditions.vue +23 -0
  40. package/app/plugins/member.client.ts +66 -0
  41. package/app/plugins/secure.client.ts +34 -0
  42. package/app/plugins/vuetify.ts +54 -0
  43. package/app/public/background.png +0 -0
  44. package/app/public/favicon.svg +1 -0
  45. package/app/public/logo.png +0 -0
  46. package/app/public/pwa-192x192.png +0 -0
  47. package/app/public/pwa-512x512.png +0 -0
  48. package/app/public/robots.txt +1 -0
  49. package/app/types/local.d.ts +113 -0
  50. package/app/types/member.d.ts +13 -0
  51. package/app/types/role.d.ts +12 -0
  52. package/content/privacy-policy.md +151 -0
  53. package/content/refund-policy.md +65 -0
  54. package/content/terms-and-conditions.md +137 -0
  55. package/content.config.ts +10 -0
  56. package/nuxt.config.ts +45 -0
  57. package/package.json +32 -0
  58. package/public/favicon.ico +0 -0
  59. package/public/robots.txt +2 -0
  60. package/tsconfig.json +18 -0
@@ -0,0 +1,134 @@
1
+ <template>
2
+ <v-row
3
+ no-gutters
4
+ class="fill-height pa-8"
5
+ justify="center"
6
+ align-content="center"
7
+ >
8
+ <v-col cols="12" lg="3" md="4" sm="6">
9
+ <v-form
10
+ v-model="isValid"
11
+ @submit.prevent="submit({ email, password })"
12
+ :disabled="loading"
13
+ >
14
+ <v-row no-gutters>
15
+ <v-col cols="12">
16
+ <v-row no-gutters justify="center">
17
+ <nuxt-link
18
+ class="text-h3 text-sm-h2 text-md-h2 text-lg-h2 text-xl-h2 font-weight-bold text-decoration-none"
19
+ style="color: unset"
20
+ :to="{ name: 'index' }"
21
+ >
22
+ GoWeekdays
23
+ </nuxt-link>
24
+ </v-row>
25
+ </v-col>
26
+
27
+ <v-col cols="12" class="mt-6">
28
+ <v-row no-gutters>
29
+ <v-col cols="12" class="text-h6 font-weight-bold"> Email </v-col>
30
+ <v-col cols="12">
31
+ <v-text-field
32
+ v-model="email"
33
+ :rules="[requiredRule, emailRule]"
34
+ ></v-text-field>
35
+ </v-col>
36
+ </v-row>
37
+ </v-col>
38
+
39
+ <v-col cols="12">
40
+ <v-row no-gutters>
41
+ <v-col cols="12" class="text-h6 font-weight-bold">
42
+ Password
43
+ </v-col>
44
+ <v-col cols="12">
45
+ <InputPassword v-model="password" :rules="[requiredRule]" />
46
+ </v-col>
47
+ </v-row>
48
+ </v-col>
49
+
50
+ <v-col v-if="message" cols="12" class="my-2 text-center font-italic">
51
+ {{ message }}
52
+ </v-col>
53
+
54
+ <v-col cols="12" class="mt-4">
55
+ <v-row no-gutters justify="center">
56
+ <v-btn
57
+ block
58
+ type="submit"
59
+ variant="tonal"
60
+ :disabled="!isValid"
61
+ rounded="xl"
62
+ size="large"
63
+ class="text-none"
64
+ :loading="loading"
65
+ >
66
+ Login
67
+ </v-btn>
68
+ </v-row>
69
+ </v-col>
70
+
71
+ <v-col cols="12" class="text-center font-weight-bold mt-4">
72
+ <nuxt-link
73
+ :to="{ name: 'forgot-password' }"
74
+ class="text-decoration-none text-primary"
75
+ >
76
+ Forgot password?
77
+ </nuxt-link>
78
+ </v-col>
79
+
80
+ <v-col cols="12" class="my-4">
81
+ <v-divider></v-divider>
82
+ </v-col>
83
+
84
+ <v-col cols="12">
85
+ <v-row no-gutters justify="center">
86
+ <v-btn
87
+ block
88
+ variant="flat"
89
+ color="black"
90
+ rounded="xl"
91
+ size="large"
92
+ class="text-none"
93
+ :to="{ name: 'sign-up' }"
94
+ >
95
+ Create new account
96
+ </v-btn>
97
+ </v-row>
98
+ </v-col>
99
+ </v-row>
100
+ </v-form>
101
+ </v-col>
102
+ </v-row>
103
+ </template>
104
+
105
+ <script setup lang="ts">
106
+ definePageMeta({
107
+ layout: "plain",
108
+ });
109
+ const { requiredRule, emailRule } = useUtils();
110
+ const email = ref("");
111
+ const password = ref("");
112
+ const isValid = ref(false);
113
+
114
+ const { login } = useLocalAuth();
115
+
116
+ const message = ref("");
117
+
118
+ const loading = ref(false);
119
+
120
+ async function submit({ email = "", password = "" } = {}) {
121
+ loading.value = true;
122
+ try {
123
+ await login({ email, password });
124
+
125
+ await navigateTo({
126
+ name: "feeds",
127
+ });
128
+ } catch (error: any) {
129
+ message.value = error.response.data.message;
130
+ } finally {
131
+ loading.value = false;
132
+ }
133
+ }
134
+ </script>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <v-row no-gutters class="fill-height" justify="center" align-content="center">
3
+ <v-col cols="12" class="mt-2 text-center font-weight-bold">
4
+ You have been logged out.
5
+ <nuxt-link :to="{ name: 'index' }">Login</nuxt-link>
6
+ </v-col>
7
+ </v-row>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ definePageMeta({
12
+ layout: "plain",
13
+ });
14
+
15
+ const { logout } = useLocalAuth();
16
+
17
+ logout();
18
+ </script>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ definePageMeta({
3
+ layout: "plain",
4
+ });
5
+
6
+ const { data } = await useAsyncData(() =>
7
+ queryCollection("content").path("/privacy-policy").first()
8
+ );
9
+
10
+ useSeoMeta({
11
+ title: data.value?.title,
12
+ description: data.value?.description,
13
+ });
14
+ </script>
15
+
16
+ <template>
17
+ <v-row no-gutters justify="center" class="pa-4">
18
+ <v-col cols="6">
19
+ <ContentRenderer v-if="data" :value="data" />
20
+ <div v-else>Home not found</div>
21
+ </v-col>
22
+ </v-row>
23
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ definePageMeta({
3
+ layout: "plain",
4
+ });
5
+
6
+ const { data } = await useAsyncData(() =>
7
+ queryCollection("content").path("/refund-policy").first()
8
+ );
9
+
10
+ useSeoMeta({
11
+ title: data.value?.title,
12
+ description: data.value?.description,
13
+ });
14
+ </script>
15
+
16
+ <template>
17
+ <v-row no-gutters justify="center" class="pa-4">
18
+ <v-col cols="6">
19
+ <ContentRenderer v-if="data" :value="data" />
20
+ <div v-else>Home not found</div>
21
+ </v-col>
22
+ </v-row>
23
+ </template>
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <v-row no-gutters class="fill-height" justify="center" align-content="center">
3
+ <v-col cols="12" lg="3" md="4" sm="6">
4
+ <v-form
5
+ v-model="valid"
6
+ @submit.prevent="submit(email, referralCode)"
7
+ :disabled="loading"
8
+ >
9
+ <v-row no-gutters>
10
+ <v-col cols="12">
11
+ <v-row no-gutters justify="center">
12
+ <nuxt-link
13
+ class="text-h2 font-weight-bold text-decoration-none"
14
+ style="color: unset"
15
+ :to="{ name: 'index' }"
16
+ >
17
+ GoWeekdays
18
+ </nuxt-link>
19
+ </v-row>
20
+ </v-col>
21
+
22
+ <v-col cols="12" class="mt-6">
23
+ <v-row no-gutters>
24
+ <v-col cols="12" class="text-h6 font-weight-bold"> Email </v-col>
25
+ <v-col cols="12">
26
+ <v-text-field
27
+ v-model="email"
28
+ :rules="[requiredRule, emailRule]"
29
+ ></v-text-field>
30
+ </v-col>
31
+ </v-row>
32
+ </v-col>
33
+
34
+ <!-- Honeypot Field (Hidden) -->
35
+ <v-text-field
36
+ v-model="goWeekdaysHoneypot"
37
+ label="Leave this field empty"
38
+ class="goWeekdaysHoneypot"
39
+ autocomplete="off"
40
+ ></v-text-field>
41
+
42
+ <v-col cols="12">
43
+ <v-row no-gutters justify="center">
44
+ <v-col
45
+ cols="12"
46
+ class="text-subtitle-1 font-weight-medium text-center font-italic"
47
+ >
48
+ {{ message }}
49
+ </v-col>
50
+ </v-row>
51
+ </v-col>
52
+
53
+ <v-col cols="12" class="mt-4">
54
+ <v-btn
55
+ block
56
+ type="submit"
57
+ variant="tonal"
58
+ :disabled="!valid"
59
+ rounded="xl"
60
+ size="large"
61
+ class="text-none"
62
+ :loading="loading"
63
+ >
64
+ Sign up
65
+ </v-btn>
66
+ </v-col>
67
+
68
+ <v-col cols="12" class="my-4">
69
+ <v-divider></v-divider>
70
+ </v-col>
71
+
72
+ <v-col cols="12" class="text-center font-weight-bold">
73
+ <v-btn
74
+ block
75
+ variant="flat"
76
+ color="black"
77
+ rounded="xl"
78
+ size="large"
79
+ class="text-none"
80
+ :to="{ name: 'login' }"
81
+ >
82
+ Login
83
+ </v-btn>
84
+ </v-col>
85
+ </v-row>
86
+ </v-form>
87
+ </v-col>
88
+ </v-row>
89
+ </template>
90
+
91
+ <script setup lang="ts">
92
+ definePageMeta({
93
+ layout: "plain",
94
+ });
95
+ const APP_AFFILIATE = useRuntimeConfig().public.APP_AFFILIATE;
96
+ const { requiredRule, emailRule } = useUtils();
97
+ const email = ref("");
98
+ const valid = ref(false);
99
+ const referralCode = ref("");
100
+
101
+ const _referralCode = (useRoute().query.referralCode as string) ?? "";
102
+ if (_referralCode) {
103
+ referralCode.value = _referralCode;
104
+ }
105
+
106
+ const goWeekdaysHoneypot = ref("");
107
+
108
+ const { signUp } = useLocalAuth();
109
+
110
+ const message = ref("");
111
+
112
+ const loading = ref(false);
113
+
114
+ async function submit(email = "", referral = "") {
115
+ loading.value = true;
116
+ if (goWeekdaysHoneypot.value) {
117
+ console.warn("Bot detected! Form rejected.");
118
+ return;
119
+ }
120
+
121
+ try {
122
+ await signUp(email, referral);
123
+ message.value = "Verification email sent! Please check your inbox.";
124
+ } catch (error: any) {
125
+ message.value = error.data.message;
126
+ } finally {
127
+ loading.value = false;
128
+ }
129
+ }
130
+ </script>
131
+
132
+ <style scoped>
133
+ .goWeekdaysHoneypot {
134
+ position: absolute;
135
+ left: -9999px;
136
+ opacity: 0;
137
+ height: 0;
138
+ width: 0;
139
+ pointer-events: none;
140
+ }
141
+ </style>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ definePageMeta({
3
+ layout: "plain",
4
+ });
5
+
6
+ const { data } = await useAsyncData(() =>
7
+ queryCollection("content").path("/terms-and-conditions").first()
8
+ );
9
+
10
+ useSeoMeta({
11
+ title: data.value?.title,
12
+ description: data.value?.description,
13
+ });
14
+ </script>
15
+
16
+ <template>
17
+ <v-row no-gutters justify="center" class="pa-4">
18
+ <v-col cols="6">
19
+ <ContentRenderer v-if="data" :value="data" />
20
+ <div v-else>Home not found</div>
21
+ </v-col>
22
+ </v-row>
23
+ </template>
@@ -0,0 +1,66 @@
1
+ export default defineNuxtPlugin(() => {
2
+ const router = useRouter();
3
+ const { getByUserType } = useMember();
4
+ const { getRoleById } = useRole();
5
+ const { membership, permissions } = useLocalAuth();
6
+
7
+ router.afterEach((to) => {
8
+ const isSecured = to.meta?.member;
9
+ if (!isSecured) return;
10
+
11
+ const APP = useRuntimeConfig().public.APP;
12
+ const org = (to.params.org as string) ?? "";
13
+
14
+ const userId = useCookie("user").value ?? "";
15
+
16
+ const {
17
+ data: userMemberData,
18
+ error: userMemberError,
19
+ refresh: refreshUserMemberData,
20
+ } = useLazyAsyncData(
21
+ "plugin-get-member-by-id" + userId,
22
+ () => getByUserType(userId, APP, org),
23
+ { immediate: false }
24
+ );
25
+
26
+ if (!membership.value) {
27
+ refreshUserMemberData();
28
+ }
29
+
30
+ watchEffect(() => {
31
+ if (userMemberError.value) {
32
+ navigateTo({
33
+ name: "index",
34
+ });
35
+ }
36
+ });
37
+
38
+ watchEffect(() => {
39
+ if (userMemberData.value) {
40
+ membership.value = userMemberData.value;
41
+ }
42
+ });
43
+
44
+ const roleId = computed(() => membership.value?.role ?? "");
45
+
46
+ const { data: roleData, refresh: refreshRoleData } = useLazyAsyncData(
47
+ "plugin-get-role-by-id" + roleId.value,
48
+ () => getRoleById(roleId.value),
49
+ { immediate: false }
50
+ );
51
+
52
+ watchEffect(() => {
53
+ if (roleId.value) {
54
+ if (!permissions.value.length) {
55
+ refreshRoleData();
56
+ }
57
+ }
58
+ });
59
+
60
+ watchEffect(() => {
61
+ if (roleData.value) {
62
+ permissions.value = roleData.value.permissions ?? [];
63
+ }
64
+ });
65
+ });
66
+ });
@@ -0,0 +1,34 @@
1
+ export default defineNuxtPlugin(() => {
2
+ const router = useRouter();
3
+ const { currentUser } = useLocalAuth();
4
+ const { cookieConfig } = useLocalSetup();
5
+
6
+ router.afterEach((to) => {
7
+ const isSecured = to.meta?.secured;
8
+ if (!isSecured) return;
9
+
10
+ const user = useCookie("user", cookieConfig).value;
11
+
12
+ if (currentUser.value) {
13
+ return;
14
+ }
15
+
16
+ const { data: getCurrentUserReq, error: getCurrentUserErr } =
17
+ useLazyAsyncData("get-current-user", () =>
18
+ $fetch<TUser>(`/api/users/id/${user}`)
19
+ );
20
+
21
+ watchEffect(() => {
22
+ if (getCurrentUserReq.value) {
23
+ currentUser.value = getCurrentUserReq.value;
24
+ }
25
+ });
26
+
27
+ watchEffect(() => {
28
+ if (getCurrentUserErr.value) {
29
+ // Redirect to login page if user authentication fails
30
+ navigateTo({ name: "index" });
31
+ }
32
+ });
33
+ });
34
+ });
@@ -0,0 +1,54 @@
1
+ // import this after install `@mdi/font` package
2
+ import "@mdi/font/css/materialdesignicons.css";
3
+ import "vuetify/styles";
4
+ import { createVuetify } from "vuetify";
5
+ import { h } from "vue";
6
+ import { Icon } from "@iconify/vue";
7
+
8
+ const defaultTheme = {
9
+ dark: false,
10
+ };
11
+
12
+ const darkTheme = {
13
+ dark: true,
14
+ };
15
+
16
+ export default defineNuxtPlugin((app) => {
17
+ const vuetify = createVuetify({
18
+ defaults: {
19
+ VTextField: {
20
+ variant: "outlined",
21
+ density: "comfortable",
22
+ },
23
+ VAutocomplete: {
24
+ variant: "outlined",
25
+ density: "comfortable",
26
+ },
27
+ VSelect: {
28
+ variant: "outlined",
29
+ density: "comfortable",
30
+ },
31
+ VTextarea: {
32
+ variant: "outlined",
33
+ density: "comfortable",
34
+ },
35
+ },
36
+ theme: {
37
+ defaultTheme: "defaultTheme",
38
+ themes: {
39
+ defaultTheme,
40
+ darkTheme,
41
+ },
42
+ },
43
+ icons: {
44
+ defaultSet: "iconify",
45
+ sets: {
46
+ iconify: {
47
+ component: (props: any) => h(Icon, { icon: props.icon }),
48
+ },
49
+ },
50
+ },
51
+ });
52
+
53
+ app.vueApp.use(vuetify);
54
+ });
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" zoomAndPan="magnify" viewBox="0 0 810 809.999993" height="1080" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><g/><clipPath id="bc3ee6a568"><path d="M 11.910156 11.285156 L 798.714844 11.285156 L 798.714844 798.089844 L 11.910156 798.089844 Z M 11.910156 11.285156 " clip-rule="nonzero"/></clipPath><clipPath id="192c4551bb"><path d="M 405.3125 11.285156 C 188.042969 11.285156 11.910156 187.417969 11.910156 404.6875 C 11.910156 621.957031 188.042969 798.089844 405.3125 798.089844 C 622.582031 798.089844 798.714844 621.957031 798.714844 404.6875 C 798.714844 187.417969 622.582031 11.285156 405.3125 11.285156 Z M 405.3125 11.285156 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#bc3ee6a568)"><g clip-path="url(#192c4551bb)"><path fill="#ffffff" d="M 11.910156 11.285156 L 798.714844 11.285156 L 798.714844 798.089844 L 11.910156 798.089844 Z M 11.910156 11.285156 " fill-opacity="1" fill-rule="nonzero"/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(80.999999, 519.217477)"><g><path d="M 256.1875 -225.265625 C 248.800781 -238.804688 238.644531 -249.113281 225.71875 -256.1875 C 212.800781 -263.269531 197.722656 -266.8125 180.484375 -266.8125 C 161.410156 -266.8125 144.488281 -262.5 129.71875 -253.875 C 114.945312 -245.257812 103.40625 -232.953125 95.09375 -216.953125 C 86.78125 -200.953125 82.625 -182.488281 82.625 -161.5625 C 82.625 -140.019531 86.851562 -121.25 95.3125 -105.25 C 103.78125 -89.25 115.550781 -76.9375 130.625 -68.3125 C 145.707031 -59.695312 163.253906 -55.390625 183.265625 -55.390625 C 207.878906 -55.390625 228.03125 -61.925781 243.71875 -75 C 259.414062 -88.082031 269.726562 -106.320312 274.65625 -129.71875 L 163.875 -129.71875 L 163.875 -179.109375 L 338.359375 -179.109375 L 338.359375 -122.78125 C 334.046875 -100.320312 324.8125 -79.550781 310.65625 -60.46875 C 296.5 -41.382812 278.265625 -26.070312 255.953125 -14.53125 C 233.648438 -3 208.648438 2.765625 180.953125 2.765625 C 149.867188 2.765625 121.785156 -4.234375 96.703125 -18.234375 C 71.628906 -32.234375 51.9375 -51.695312 37.625 -76.625 C 23.3125 -101.550781 16.15625 -129.863281 16.15625 -161.5625 C 16.15625 -193.257812 23.3125 -221.644531 37.625 -246.71875 C 51.9375 -271.800781 71.628906 -291.34375 96.703125 -305.34375 C 121.785156 -319.351562 149.710938 -326.359375 180.484375 -326.359375 C 216.796875 -326.359375 248.335938 -317.507812 275.109375 -299.8125 C 301.890625 -282.113281 320.359375 -257.265625 330.515625 -225.265625 Z M 256.1875 -225.265625 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(435.511348, 519.217477)"><g><path d="M 145.40625 4.15625 C 120.789062 4.15625 98.632812 -1.304688 78.9375 -12.234375 C 59.238281 -23.160156 43.769531 -38.625 32.53125 -58.625 C 21.300781 -78.625 15.6875 -101.703125 15.6875 -127.859375 C 15.6875 -154.023438 21.457031 -177.109375 33 -197.109375 C 44.539062 -217.109375 60.3125 -232.570312 80.3125 -243.5 C 100.320312 -254.425781 122.632812 -259.890625 147.25 -259.890625 C 171.875 -259.890625 194.1875 -254.425781 214.1875 -243.5 C 234.1875 -232.570312 249.957031 -217.109375 261.5 -197.109375 C 273.039062 -177.109375 278.8125 -154.023438 278.8125 -127.859375 C 278.8125 -101.703125 272.882812 -78.625 261.03125 -58.625 C 249.1875 -38.625 233.1875 -23.160156 213.03125 -12.234375 C 192.875 -1.304688 170.332031 4.15625 145.40625 4.15625 Z M 145.40625 -52.15625 C 157.101562 -52.15625 168.101562 -55 178.40625 -60.6875 C 188.71875 -66.382812 196.953125 -74.925781 203.109375 -86.3125 C 209.265625 -97.707031 212.34375 -111.554688 212.34375 -127.859375 C 212.34375 -152.171875 205.957031 -170.863281 193.1875 -183.9375 C 180.414062 -197.019531 164.796875 -203.5625 146.328125 -203.5625 C 127.867188 -203.5625 112.40625 -197.019531 99.9375 -183.9375 C 87.476562 -170.863281 81.25 -152.171875 81.25 -127.859375 C 81.25 -103.554688 87.320312 -84.863281 99.46875 -71.78125 C 111.625 -58.695312 126.9375 -52.15625 145.40625 -52.15625 Z M 145.40625 -52.15625 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(133.492672, 600.051933)"><g><path d="M 79.765625 -55.5625 L 64.25 0 L 51.109375 0 L 40.6875 -39.5625 L 29.78125 0 L 16.71875 0.078125 L 1.75 -55.5625 L 13.6875 -55.5625 L 23.484375 -12.421875 L 34.796875 -55.5625 L 47.203125 -55.5625 L 57.875 -12.65625 L 67.75 -55.5625 Z M 79.765625 -55.5625 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(215.01177, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(233.958597, 600.051933)"><g><path d="M 46.484375 -23 C 46.484375 -21.414062 46.378906 -19.984375 46.171875 -18.703125 L 13.9375 -18.703125 C 14.195312 -15.523438 15.304688 -13.03125 17.265625 -11.21875 C 19.234375 -9.414062 21.648438 -8.515625 24.515625 -8.515625 C 28.660156 -8.515625 31.609375 -10.296875 33.359375 -13.859375 L 45.375 -13.859375 C 44.101562 -9.609375 41.660156 -6.113281 38.046875 -3.375 C 34.441406 -0.644531 30.015625 0.71875 24.765625 0.71875 C 20.515625 0.71875 16.703125 -0.222656 13.328125 -2.109375 C 9.960938 -3.992188 7.335938 -6.660156 5.453125 -10.109375 C 3.566406 -13.554688 2.625 -17.535156 2.625 -22.046875 C 2.625 -26.609375 3.550781 -30.613281 5.40625 -34.0625 C 7.269531 -37.519531 9.875 -40.175781 13.21875 -42.03125 C 16.5625 -43.882812 20.410156 -44.8125 24.765625 -44.8125 C 28.953125 -44.8125 32.703125 -43.910156 36.015625 -42.109375 C 39.335938 -40.304688 41.910156 -37.742188 43.734375 -34.421875 C 45.566406 -31.109375 46.484375 -27.300781 46.484375 -23 Z M 34.953125 -26.1875 C 34.898438 -29.050781 33.863281 -31.347656 31.84375 -33.078125 C 29.820312 -34.804688 27.351562 -35.671875 24.4375 -35.671875 C 21.675781 -35.671875 19.351562 -34.832031 17.46875 -33.15625 C 15.582031 -31.488281 14.429688 -29.164062 14.015625 -26.1875 Z M 34.953125 -26.1875 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(283.077036, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(302.023862, 600.051933)"><g><path d="M 46.484375 -23 C 46.484375 -21.414062 46.378906 -19.984375 46.171875 -18.703125 L 13.9375 -18.703125 C 14.195312 -15.523438 15.304688 -13.03125 17.265625 -11.21875 C 19.234375 -9.414062 21.648438 -8.515625 24.515625 -8.515625 C 28.660156 -8.515625 31.609375 -10.296875 33.359375 -13.859375 L 45.375 -13.859375 C 44.101562 -9.609375 41.660156 -6.113281 38.046875 -3.375 C 34.441406 -0.644531 30.015625 0.71875 24.765625 0.71875 C 20.515625 0.71875 16.703125 -0.222656 13.328125 -2.109375 C 9.960938 -3.992188 7.335938 -6.660156 5.453125 -10.109375 C 3.566406 -13.554688 2.625 -17.535156 2.625 -22.046875 C 2.625 -26.609375 3.550781 -30.613281 5.40625 -34.0625 C 7.269531 -37.519531 9.875 -40.175781 13.21875 -42.03125 C 16.5625 -43.882812 20.410156 -44.8125 24.765625 -44.8125 C 28.953125 -44.8125 32.703125 -43.910156 36.015625 -42.109375 C 39.335938 -40.304688 41.910156 -37.742188 43.734375 -34.421875 C 45.566406 -31.109375 46.484375 -27.300781 46.484375 -23 Z M 34.953125 -26.1875 C 34.898438 -29.050781 33.863281 -31.347656 31.84375 -33.078125 C 29.820312 -34.804688 27.351562 -35.671875 24.4375 -35.671875 C 21.675781 -35.671875 19.351562 -34.832031 17.46875 -33.15625 C 15.582031 -31.488281 14.429688 -29.164062 14.015625 -26.1875 Z M 34.953125 -26.1875 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(351.142301, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(370.089127, 600.051933)"><g><path d="M 31.609375 0 L 16.640625 -18.78125 L 16.640625 0 L 5.5 0 L 5.5 -58.90625 L 16.640625 -58.90625 L 16.640625 -25.390625 L 31.453125 -44.109375 L 45.9375 -44.109375 L 26.515625 -21.96875 L 46.09375 0 Z M 31.609375 0 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(416.580491, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(435.527318, 600.051933)"><g><path d="M 2.625 -22.21875 C 2.625 -26.664062 3.515625 -30.613281 5.296875 -34.0625 C 7.078125 -37.519531 9.503906 -40.175781 12.578125 -42.03125 C 15.660156 -43.882812 19.082031 -44.8125 22.84375 -44.8125 C 25.707031 -44.8125 28.441406 -44.1875 31.046875 -42.9375 C 33.648438 -41.695312 35.71875 -40.039062 37.25 -37.96875 L 37.25 -58.90625 L 48.5625 -58.90625 L 48.5625 0 L 37.25 0 L 37.25 -6.53125 C 35.875 -4.351562 33.9375 -2.597656 31.4375 -1.265625 C 28.945312 0.0546875 26.054688 0.71875 22.765625 0.71875 C 19.054688 0.71875 15.660156 -0.234375 12.578125 -2.140625 C 9.503906 -4.054688 7.078125 -6.75 5.296875 -10.21875 C 3.515625 -13.695312 2.625 -17.695312 2.625 -22.21875 Z M 37.34375 -22.046875 C 37.34375 -24.753906 36.8125 -27.078125 35.75 -29.015625 C 34.6875 -30.953125 33.25 -32.4375 31.4375 -33.46875 C 29.632812 -34.507812 27.703125 -35.03125 25.640625 -35.03125 C 23.566406 -35.03125 21.65625 -34.523438 19.90625 -33.515625 C 18.15625 -32.503906 16.734375 -31.03125 15.640625 -29.09375 C 14.554688 -27.15625 14.015625 -24.863281 14.015625 -22.21875 C 14.015625 -19.5625 14.554688 -17.238281 15.640625 -15.25 C 16.734375 -13.257812 18.164062 -11.734375 19.9375 -10.671875 C 21.71875 -9.609375 23.617188 -9.078125 25.640625 -9.078125 C 27.703125 -9.078125 29.632812 -9.59375 31.4375 -10.625 C 33.25 -11.664062 34.6875 -13.148438 35.75 -15.078125 C 36.8125 -17.015625 37.34375 -19.335938 37.34375 -22.046875 Z M 37.34375 -22.046875 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(489.501879, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(508.448706, 600.051933)"><g><path d="M 2.625 -22.21875 C 2.625 -26.664062 3.515625 -30.613281 5.296875 -34.0625 C 7.078125 -37.519531 9.488281 -40.175781 12.53125 -42.03125 C 15.582031 -43.882812 18.992188 -44.8125 22.765625 -44.8125 C 26.054688 -44.8125 28.9375 -44.148438 31.40625 -42.828125 C 33.875 -41.503906 35.851562 -39.832031 37.34375 -37.8125 L 37.34375 -44.109375 L 48.5625 -44.109375 L 48.5625 0 L 37.34375 0 L 37.34375 -6.453125 C 35.90625 -4.378906 33.925781 -2.664062 31.40625 -1.3125 C 28.882812 0.0390625 25.976562 0.71875 22.6875 0.71875 C 18.96875 0.71875 15.582031 -0.234375 12.53125 -2.140625 C 9.488281 -4.054688 7.078125 -6.75 5.296875 -10.21875 C 3.515625 -13.695312 2.625 -17.695312 2.625 -22.21875 Z M 37.34375 -22.046875 C 37.34375 -24.753906 36.8125 -27.078125 35.75 -29.015625 C 34.6875 -30.953125 33.25 -32.4375 31.4375 -33.46875 C 29.632812 -34.507812 27.703125 -35.03125 25.640625 -35.03125 C 23.566406 -35.03125 21.65625 -34.523438 19.90625 -33.515625 C 18.15625 -32.503906 16.734375 -31.03125 15.640625 -29.09375 C 14.554688 -27.15625 14.015625 -24.863281 14.015625 -22.21875 C 14.015625 -19.5625 14.554688 -17.238281 15.640625 -15.25 C 16.734375 -13.257812 18.164062 -11.734375 19.9375 -10.671875 C 21.71875 -9.609375 23.617188 -9.078125 25.640625 -9.078125 C 27.703125 -9.078125 29.632812 -9.59375 31.4375 -10.625 C 33.25 -11.664062 34.6875 -13.148438 35.75 -15.078125 C 36.8125 -17.015625 37.34375 -19.335938 37.34375 -22.046875 Z M 37.34375 -22.046875 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(562.423267, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(581.370094, 600.051933)"><g><path d="M 47.6875 -44.109375 L 20.375 20.859375 L 8.515625 20.859375 L 18.078125 -1.109375 L 0.390625 -44.109375 L 12.890625 -44.109375 L 24.28125 -13.296875 L 35.828125 -44.109375 Z M 47.6875 -44.109375 "/></g></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(629.533261, 600.051933)"><g/></g></g><g fill="#000000" fill-opacity="1"><g transform="translate(648.480087, 600.051933)"><g><path d="M 22.375 0.71875 C 18.757812 0.71875 15.519531 0.0664062 12.65625 -1.234375 C 9.789062 -2.535156 7.519531 -4.300781 5.84375 -6.53125 C 4.175781 -8.757812 3.265625 -11.226562 3.109375 -13.9375 L 14.328125 -13.9375 C 14.535156 -12.238281 15.367188 -10.832031 16.828125 -9.71875 C 18.296875 -8.601562 20.117188 -8.046875 22.296875 -8.046875 C 24.410156 -8.046875 26.066406 -8.46875 27.265625 -9.3125 C 28.460938 -10.164062 29.0625 -11.253906 29.0625 -12.578125 C 29.0625 -14.015625 28.328125 -15.085938 26.859375 -15.796875 C 25.398438 -16.515625 23.082031 -17.300781 19.90625 -18.15625 C 16.613281 -18.945312 13.914062 -19.765625 11.8125 -20.609375 C 9.71875 -21.460938 7.914062 -22.765625 6.40625 -24.515625 C 4.894531 -26.265625 4.140625 -28.628906 4.140625 -31.609375 C 4.140625 -34.046875 4.84375 -36.269531 6.25 -38.28125 C 7.65625 -40.300781 9.671875 -41.894531 12.296875 -43.0625 C 14.921875 -44.226562 18.015625 -44.8125 21.578125 -44.8125 C 26.828125 -44.8125 31.015625 -43.5 34.140625 -40.875 C 37.273438 -38.25 39.003906 -34.707031 39.328125 -30.25 L 28.65625 -30.25 C 28.5 -32 27.769531 -33.390625 26.46875 -34.421875 C 25.164062 -35.460938 23.425781 -35.984375 21.25 -35.984375 C 19.238281 -35.984375 17.6875 -35.609375 16.59375 -34.859375 C 15.507812 -34.117188 14.96875 -33.085938 14.96875 -31.765625 C 14.96875 -30.273438 15.707031 -29.144531 17.1875 -28.375 C 18.675781 -27.601562 20.988281 -26.820312 24.125 -26.03125 C 27.300781 -25.238281 29.925781 -24.414062 32 -23.5625 C 34.070312 -22.71875 35.863281 -21.40625 37.375 -19.625 C 38.882812 -17.84375 39.664062 -15.492188 39.71875 -12.578125 C 39.71875 -10.023438 39.015625 -7.738281 37.609375 -5.71875 C 36.203125 -3.707031 34.1875 -2.128906 31.5625 -0.984375 C 28.9375 0.148438 25.875 0.71875 22.375 0.71875 Z M 22.375 0.71875 "/></g></g></g></svg>
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,113 @@
1
+ declare type TUserRole = {
2
+ app: string;
3
+ role: string;
4
+ status: string;
5
+ };
6
+
7
+ declare type TUser = {
8
+ _id: string;
9
+ email: string;
10
+ password: string;
11
+ firstName: string;
12
+ middleName?: string;
13
+ lastName: string;
14
+ suffix?: string;
15
+ birthMonth?: string;
16
+ birthDay?: number;
17
+ birthYear?: number;
18
+ gender?: string;
19
+ defaultOrg?: string;
20
+ profile?: string;
21
+ contact?: string;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ status: string;
25
+ roles: TUserRole[];
26
+ type: string;
27
+ deletedAt: string;
28
+ };
29
+
30
+ declare type TToken = {
31
+ accessToken: string;
32
+ refreshToken: string;
33
+ id: string;
34
+ };
35
+
36
+ declare type TNavigationRoute = {
37
+ name: string;
38
+ params?: TKeyValuePair;
39
+ };
40
+
41
+ declare type TNavigationItem = {
42
+ title: string;
43
+ icon?: string;
44
+ route?: TNavigationRoute;
45
+ children?: TNavigationItem[];
46
+ };
47
+
48
+ declare type TOrg = {
49
+ _id?: string;
50
+ name: string;
51
+ email: string;
52
+ busInst: string;
53
+ owner: string;
54
+ type: string;
55
+ createdAt?: string;
56
+ updatedAt?: string;
57
+ status?: string;
58
+ deletedAt?: string;
59
+ };
60
+
61
+ declare type TKeyValuePair<
62
+ K extends string | number | symbol = string,
63
+ V = any,
64
+ > = {
65
+ [key in K]: V;
66
+ };
67
+
68
+ declare type TTeam = {
69
+ _id?: string;
70
+ name?: string;
71
+ owner?: string;
72
+ org?: string;
73
+ app?: string;
74
+ status?: string;
75
+ createdAt?: string;
76
+ updatedAt?: string;
77
+ deletedAt?: string;
78
+ };
79
+
80
+ declare type TOneTimePassword = {
81
+ _id?: string;
82
+ type?: string;
83
+ user?: string;
84
+ userType?: string;
85
+ team?: string;
86
+ member?: string;
87
+ status?: string;
88
+ createdAt?: string;
89
+ updatedAt?: string | null;
90
+ expireAt?: string;
91
+ };
92
+
93
+ declare type TOrgsAsOption = {
94
+ value: string;
95
+ title: string;
96
+ subtitle?: string;
97
+ email?: string;
98
+ };
99
+
100
+ declare type TPermissionCheck =
101
+ | boolean
102
+ | ((user: TMember, data?: any) => boolean);
103
+
104
+ declare type TPermission = {
105
+ check: TPermissionCheck;
106
+ description: string;
107
+ };
108
+
109
+ declare type TPermissions = {
110
+ [resource: string]: {
111
+ [action: string]: TPermission;
112
+ };
113
+ };