From 124cb74d78af1b7e17fea4994629074d907ae6f2 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Mon, 15 Jan 2024 13:43:06 +0200 Subject: [PATCH 01/31] calender --- client/package.json | 14 +- client/pnpm-lock.yaml | 197 ++++++++++++++++++++--------- client/src/components/calender.vue | 27 ++++ 3 files changed, 171 insertions(+), 67 deletions(-) create mode 100644 client/src/components/calender.vue diff --git a/client/package.json b/client/package.json index 5162b7ca..117a8df1 100644 --- a/client/package.json +++ b/client/package.json @@ -14,12 +14,18 @@ "format": "prettier --write src/" }, "dependencies": { + "@fullcalendar/core": "^6.1.9", + "@fullcalendar/daygrid": "^6.1.9", + "@fullcalendar/interaction": "^6.1.9", + "@fullcalendar/list": "^6.1.9", + "@fullcalendar/timegrid": "^6.1.9", + "@fullcalendar/vue3": "^6.1.9", "@mdi/font": "^7.4.47", "@vueuse/core": "^10.7.1", "@vueuse/router": "^10.7.1", "axios": "^1.6.3", "pinia": "^2.1.7", - "vue": "^3.3.11", + "vue": "^3.2.0", "vue-router": "^4.2.5", "vue3-notifier": "^1.0.2", "vuetify": "^3.4.9" @@ -35,13 +41,13 @@ "@vue/eslint-config-typescript": "^12.0.0", "@vue/test-utils": "^2.4.3", "@vue/tsconfig": "^0.5.0", - "eslint": "^8.49.0", - "eslint-plugin-vue": "^9.17.0", + "eslint": "^8.37.0", + "eslint-plugin-vue": "^9.10.0", "jsdom": "^23.0.1", "npm-run-all2": "^6.1.1", "prettier": "^3.0.3", "sass": "^1.69.6", - "typescript": "~5.3.0", + "typescript": "~4.8.4", "vite": "^5.0.10", "vite-plugin-vuetify": "^2.0.1", "vitest": "^1.0.4", diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 3c807502..1affa75b 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -5,6 +5,24 @@ settings: excludeLinksFromLockfile: false dependencies: + '@fullcalendar/core': + specifier: ^6.1.9 + version: 6.1.10 + '@fullcalendar/daygrid': + specifier: ^6.1.9 + version: 6.1.10(@fullcalendar/core@6.1.10) + '@fullcalendar/interaction': + specifier: ^6.1.9 + version: 6.1.10(@fullcalendar/core@6.1.10) + '@fullcalendar/list': + specifier: ^6.1.9 + version: 6.1.10(@fullcalendar/core@6.1.10) + '@fullcalendar/timegrid': + specifier: ^6.1.9 + version: 6.1.10(@fullcalendar/core@6.1.10) + '@fullcalendar/vue3': + specifier: ^6.1.9 + version: 6.1.10(@fullcalendar/core@6.1.10)(vue@3.4.3) '@mdi/font': specifier: ^7.4.47 version: 7.4.47 @@ -19,19 +37,19 @@ dependencies: version: 1.6.3 pinia: specifier: ^2.1.7 - version: 2.1.7(typescript@5.3.3)(vue@3.4.3) + version: 2.1.7(typescript@4.8.4)(vue@3.4.3) vue: - specifier: ^3.3.11 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.2.0 + version: 3.4.3(typescript@4.8.4) vue-router: specifier: ^4.2.5 version: 4.2.5(vue@3.4.3) vue3-notifier: specifier: ^1.0.2 - version: 1.0.2(typescript@5.3.3) + version: 1.0.2(typescript@4.8.4) vuetify: specifier: ^3.4.9 - version: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + version: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) devDependencies: '@faker-js/faker': @@ -57,7 +75,7 @@ devDependencies: version: 8.0.0(eslint@8.56.0)(prettier@3.1.1) '@vue/eslint-config-typescript': specifier: ^12.0.0 - version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3) + version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@4.8.4) '@vue/test-utils': specifier: ^2.4.3 version: 2.4.3(vue@3.4.3) @@ -65,10 +83,10 @@ devDependencies: specifier: ^0.5.0 version: 0.5.1 eslint: - specifier: ^8.49.0 + specifier: ^8.37.0 version: 8.56.0 eslint-plugin-vue: - specifier: ^9.17.0 + specifier: ^9.10.0 version: 9.19.2(eslint@8.56.0) jsdom: specifier: ^23.0.1 @@ -83,8 +101,8 @@ devDependencies: specifier: ^1.69.6 version: 1.69.6 typescript: - specifier: ~5.3.0 - version: 5.3.3 + specifier: ~4.8.4 + version: 4.8.4 vite: specifier: ^5.0.10 version: 5.0.10(@types/node@18.19.4)(sass@1.69.6) @@ -96,7 +114,7 @@ devDependencies: version: 1.1.1(@types/node@18.19.4)(jsdom@23.0.1)(sass@1.69.6) vue-tsc: specifier: ^1.8.25 - version: 1.8.27(typescript@5.3.3) + version: 1.8.27(typescript@4.8.4) packages: @@ -371,6 +389,55 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} dev: true + /@fullcalendar/core@6.1.10: + resolution: {integrity: sha512-oTXGJSAGpCf1oY+CKp5qYjMHkJCPBkJ3SHitl63n8Q6xKeiwQ4EF6Au451euUovREwJpLmD1AyZrCnWmtB9AVg==} + dependencies: + preact: 10.12.1 + dev: false + + /@fullcalendar/daygrid@6.1.10(@fullcalendar/core@6.1.10): + resolution: {integrity: sha512-Z4GRm1IyHKgxXFTWGcEI0nTsvYOIkpE0aMt3/o3ER2SZkF+hfwcDFhtj0c9+WhMjXFIWYeoTnA9rUOY7Zl/nxA==} + peerDependencies: + '@fullcalendar/core': ~6.1.10 + dependencies: + '@fullcalendar/core': 6.1.10 + dev: false + + /@fullcalendar/interaction@6.1.10(@fullcalendar/core@6.1.10): + resolution: {integrity: sha512-aZRlwCpmDasq2RNeWV0ub20Uevare9Cb6iMlxCacx0fhOC14H28G9d1FsduJIecInL84SPGwt5ItqAYMsWv7zw==} + peerDependencies: + '@fullcalendar/core': ~6.1.10 + dependencies: + '@fullcalendar/core': 6.1.10 + dev: false + + /@fullcalendar/list@6.1.10(@fullcalendar/core@6.1.10): + resolution: {integrity: sha512-WE4vuSUCzol4tJd0ZP0cNxeyRPaZcsVVYs2I3qdf3OZQkXwDCdSyWEz0Hluf+XZWcZXt21aEYKlxRjwUpQcf4Q==} + peerDependencies: + '@fullcalendar/core': ~6.1.10 + dependencies: + '@fullcalendar/core': 6.1.10 + dev: false + + /@fullcalendar/timegrid@6.1.10(@fullcalendar/core@6.1.10): + resolution: {integrity: sha512-hFKyQXJaPbNyq1reZmvkCmM64O99krHoIcJAbDS+dntCm3FzZUcDtAcRKIbMiantHrezCG/1MEYk3m9e3aKvIQ==} + peerDependencies: + '@fullcalendar/core': ~6.1.10 + dependencies: + '@fullcalendar/core': 6.1.10 + '@fullcalendar/daygrid': 6.1.10(@fullcalendar/core@6.1.10) + dev: false + + /@fullcalendar/vue3@6.1.10(@fullcalendar/core@6.1.10)(vue@3.4.3): + resolution: {integrity: sha512-YMYBQx0TlWNuN4G6ra2dkf5cCF5aVi/2zDLGLvLqe2Nk2o7uNbTkrCSG40061OepWQlJv+hYqm1JukLRmyqi4Q==} + peerDependencies: + '@fullcalendar/core': ~6.1.10 + vue: ^3.0.11 + dependencies: + '@fullcalendar/core': 6.1.10 + vue: 3.4.3(typescript@4.8.4) + dev: false + /@humanwhocodes/config-array@0.11.13: resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} @@ -590,7 +657,7 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: false - /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3): + /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@4.8.4): resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -602,10 +669,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@4.8.4) '@typescript-eslint/scope-manager': 6.16.0 - '@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) '@typescript-eslint/visitor-keys': 6.16.0 debug: 4.3.4 eslint: 8.56.0 @@ -613,13 +680,13 @@ packages: ignore: 5.3.0 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.0.3(typescript@4.8.4) + typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@5.3.3): + /@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@4.8.4): resolution: {integrity: sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -631,11 +698,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.16.0 '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) '@typescript-eslint/visitor-keys': 6.16.0 debug: 4.3.4 eslint: 8.56.0 - typescript: 5.3.3 + typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true @@ -648,7 +715,7 @@ packages: '@typescript-eslint/visitor-keys': 6.16.0 dev: true - /@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@5.3.3): + /@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@4.8.4): resolution: {integrity: sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -658,12 +725,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) - '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) debug: 4.3.4 eslint: 8.56.0 - ts-api-utils: 1.0.3(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.0.3(typescript@4.8.4) + typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true @@ -673,7 +740,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.16.0(typescript@5.3.3): + /@typescript-eslint/typescript-estree@6.16.0(typescript@4.8.4): resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -689,13 +756,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.0.3(typescript@4.8.4) + typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.3.3): + /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@4.8.4): resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -706,7 +773,7 @@ packages: '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 6.16.0 '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -734,7 +801,7 @@ packages: vue: ^3.2.25 dependencies: vite: 5.0.10(@types/node@18.19.4)(sass@1.69.6) - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) dev: true /@vitest/expect@1.1.1: @@ -846,7 +913,7 @@ packages: - '@types/eslint' dev: true - /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3): + /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@4.8.4): resolution: {integrity: sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: @@ -857,17 +924,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@4.8.4) eslint: 8.56.0 eslint-plugin-vue: 9.19.2(eslint@8.56.0) - typescript: 5.3.3 + typescript: 4.8.4 vue-eslint-parser: 9.3.2(eslint@8.56.0) transitivePeerDependencies: - supports-color dev: true - /@vue/language-core@1.8.27(typescript@5.3.3): + /@vue/language-core@1.8.27(typescript@4.8.4): resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} peerDependencies: typescript: '*' @@ -883,7 +950,7 @@ packages: minimatch: 9.0.3 muggle-string: 0.3.1 path-browserify: 1.0.1 - typescript: 5.3.3 + typescript: 4.8.4 vue-template-compiler: 2.7.16 dev: true @@ -912,7 +979,7 @@ packages: dependencies: '@vue/compiler-ssr': 3.4.3 '@vue/shared': 3.4.3 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) /@vue/shared@3.4.3: resolution: {integrity: sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==} @@ -927,7 +994,7 @@ packages: optional: true dependencies: js-beautify: 1.14.11 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) vue-component-type-helpers: 1.8.27 dev: true @@ -942,8 +1009,8 @@ packages: vuetify: ^3.0.0 dependencies: upath: 2.0.1 - vue: 3.4.3(typescript@5.3.3) - vuetify: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + vue: 3.4.3(typescript@4.8.4) + vuetify: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) /@vueuse/core@10.7.1(vue@3.4.3): resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} @@ -2312,7 +2379,7 @@ packages: hasBin: true dev: true - /pinia@2.1.7(typescript@5.3.3)(vue@3.4.3): + /pinia@2.1.7(typescript@4.8.4)(vue@3.4.3): resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} peerDependencies: '@vue/composition-api': ^1.4.0 @@ -2325,8 +2392,8 @@ packages: optional: true dependencies: '@vue/devtools-api': 6.5.1 - typescript: 5.3.3 - vue: 3.4.3(typescript@5.3.3) + typescript: 4.8.4 + vue: 3.4.3(typescript@4.8.4) vue-demi: 0.14.6(vue@3.4.3) dev: false @@ -2354,6 +2421,10 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /preact@10.12.1: + resolution: {integrity: sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==} + dev: false + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2688,13 +2759,13 @@ packages: punycode: 2.3.1 dev: true - /ts-api-utils@1.0.3(typescript@5.3.3): + /ts-api-utils@1.0.3(typescript@4.8.4): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.3.3 + typescript: 4.8.4 dev: true /tslib@2.6.2: @@ -2728,9 +2799,9 @@ packages: engines: {node: '>=16'} dev: true - /typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} - engines: {node: '>=14.17'} + /typescript@4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} hasBin: true /ufo@1.3.2: @@ -2806,8 +2877,8 @@ packages: debug: 4.3.4 upath: 2.0.1 vite: 5.0.10(@types/node@18.19.4)(sass@1.69.6) - vue: 3.4.3(typescript@5.3.3) - vuetify: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + vue: 3.4.3(typescript@4.8.4) + vuetify: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) transitivePeerDependencies: - supports-color @@ -2921,7 +2992,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) dev: false /vue-eslint-parser@9.3.2(eslint@8.56.0): @@ -2948,7 +3019,7 @@ packages: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) dev: false /vue-template-compiler@2.7.16: @@ -2958,29 +3029,29 @@ packages: he: 1.2.0 dev: true - /vue-tsc@1.8.27(typescript@5.3.3): + /vue-tsc@1.8.27(typescript@4.8.4): resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} hasBin: true peerDependencies: typescript: '*' dependencies: '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.3.3) + '@vue/language-core': 1.8.27(typescript@4.8.4) semver: 7.5.4 - typescript: 5.3.3 + typescript: 4.8.4 dev: true - /vue3-notifier@1.0.2(typescript@5.3.3): + /vue3-notifier@1.0.2(typescript@4.8.4): resolution: {integrity: sha512-o/RlQhA4N7WYO5mtwHCJE04CgSUGUbpF++1nyGWgPw9v5QDQGzf85XTygQq2m0LJcVBMLo6D9v/YDkUl5gtYTw==} dependencies: chalk: 5.3.0 gsap: 3.12.4 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) transitivePeerDependencies: - typescript dev: false - /vue@3.4.3(typescript@5.3.3): + /vue@3.4.3(typescript@4.8.4): resolution: {integrity: sha512-GjN+culMAGv/mUbkIv8zMKItno8npcj5gWlXkSxf1SPTQf8eJ4A+YfHIvQFyL1IfuJcMl3soA7SmN1fRxbf/wA==} peerDependencies: typescript: '*' @@ -2993,9 +3064,9 @@ packages: '@vue/runtime-dom': 3.4.3 '@vue/server-renderer': 3.4.3(vue@3.4.3) '@vue/shared': 3.4.3 - typescript: 5.3.3 + typescript: 4.8.4 - /vuetify@3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3): + /vuetify@3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3): resolution: {integrity: sha512-pgBPdbgrHHHZWRybWevzRFezMax6CP2MccTivjOZSOF0XsnzoNOJGGpkTgIfBrk4UCp9jKx6JOJIztGtx/IcSw==} engines: {node: ^12.20 || >=14.13} peerDependencies: @@ -3014,9 +3085,9 @@ packages: webpack-plugin-vuetify: optional: true dependencies: - typescript: 5.3.3 + typescript: 4.8.4 vite-plugin-vuetify: 2.0.1(vite@5.0.10)(vue@3.4.3)(vuetify@3.4.9) - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.3(typescript@4.8.4) /w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue new file mode 100644 index 00000000..ab402192 --- /dev/null +++ b/client/src/components/calender.vue @@ -0,0 +1,27 @@ + From d6f838394706de06275ee9dea9ed9de3537cd8d8 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Tue, 16 Jan 2024 16:23:51 +0200 Subject: [PATCH 02/31] calender --- client/package.json | 1 + client/pnpm-lock.yaml | 3 + client/src/clients/api/event.ts | 14 ++- client/src/clients/api/meeting.ts | 11 +- client/src/components/calender.vue | 73 +++++++++++- client/src/components/calenderRequest.vue | 60 ++++++++++ .../src/components/requests/eventRequest.vue | 108 ++++++++++++++++++ .../src/components/requests/leaveRequest.vue | 96 ++++++++++++++++ .../components/requests/meetingRequest.vue | 96 ++++++++++++++++ client/src/types/api.ts | 16 +++ client/src/utils/helpers.ts | 4 + client/src/views/CalendarView.vue | 13 ++- 12 files changed, 485 insertions(+), 10 deletions(-) create mode 100644 client/src/components/calenderRequest.vue create mode 100644 client/src/components/requests/eventRequest.vue create mode 100644 client/src/components/requests/leaveRequest.vue create mode 100644 client/src/components/requests/meetingRequest.vue diff --git a/client/package.json b/client/package.json index 117a8df1..c246c64f 100644 --- a/client/package.json +++ b/client/package.json @@ -24,6 +24,7 @@ "@vueuse/core": "^10.7.1", "@vueuse/router": "^10.7.1", "axios": "^1.6.3", + "calendar_options": "link:@fullcalendar/core/calendar_options", "pinia": "^2.1.7", "vue": "^3.2.0", "vue-router": "^4.2.5", diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 1affa75b..1bbacdd2 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -35,6 +35,9 @@ dependencies: axios: specifier: ^1.6.3 version: 1.6.3 + calendar_options: + specifier: link:@fullcalendar/core/calendar_options + version: link:@fullcalendar/core/calendar_options pinia: specifier: ^2.1.7 version: 2.1.7(typescript@4.8.4)(vue@3.4.3) diff --git a/client/src/clients/api/event.ts b/client/src/clients/api/event.ts index 99c933be..ce017720 100644 --- a/client/src/clients/api/event.ts +++ b/client/src/clients/api/event.ts @@ -14,7 +14,19 @@ export class EventApi extends ApiClientBase { async list() {} - async create() {} + async create(input: Api.Inputs.Event) { + ApiClientBase.assertUser() + + console.log("input",input); + + const event = await this.unwrap( + this.$http.post(this.getUrl('', input)), + { transform: (d) => d.results } + ) + + return event + } + async read(id: number) {} diff --git a/client/src/clients/api/meeting.ts b/client/src/clients/api/meeting.ts index d6593ae2..8a6252c6 100644 --- a/client/src/clients/api/meeting.ts +++ b/client/src/clients/api/meeting.ts @@ -13,8 +13,17 @@ export class MeetingApi extends ApiClientBase { } async list() {} + async create(input: Api.Inputs.Meeting) { + ApiClientBase.assertUser() - async create() {} + + const event = await this.unwrap( + this.$http.post(this.getUrl('', input)), + { transform: (d) => d.results } + ) + + return event + } async read(id: number) {} diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index ab402192..36bc1077 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -1,26 +1,87 @@ + diff --git a/client/src/components/requests/eventRequest.vue b/client/src/components/requests/eventRequest.vue new file mode 100644 index 00000000..1ba212bb --- /dev/null +++ b/client/src/components/requests/eventRequest.vue @@ -0,0 +1,108 @@ + + + diff --git a/client/src/components/requests/leaveRequest.vue b/client/src/components/requests/leaveRequest.vue new file mode 100644 index 00000000..3b0f0e3b --- /dev/null +++ b/client/src/components/requests/leaveRequest.vue @@ -0,0 +1,96 @@ + + + diff --git a/client/src/components/requests/meetingRequest.vue b/client/src/components/requests/meetingRequest.vue new file mode 100644 index 00000000..a6ca76fb --- /dev/null +++ b/client/src/components/requests/meetingRequest.vue @@ -0,0 +1,96 @@ + + + diff --git a/client/src/types/api.ts b/client/src/types/api.ts index e8e3983a..866e551b 100644 --- a/client/src/types/api.ts +++ b/client/src/types/api.ts @@ -100,6 +100,9 @@ export module Api { message: string results: T } + export type Event = MsgRes + export type Meeting = MsgRes + export type Profile = MsgRes export type Login = MsgRes<{ @@ -150,6 +153,19 @@ export module Api { } } export module Inputs { + export interface Event { + name: string + description: string + from_date: string + end_date: string + } + + export interface Meeting { + date: string + meeting_link: string + location: string + } + export interface Login { email: string password: string diff --git a/client/src/utils/helpers.ts b/client/src/utils/helpers.ts index 35b961b3..44a04116 100644 --- a/client/src/utils/helpers.ts +++ b/client/src/utils/helpers.ts @@ -24,3 +24,7 @@ export const passwordRules = [ (v: string) => !!v || 'Password is required.', (v: string) => v.length > 3 || 'Password must be more than 3 characters.' ] + +export const fieldRequired = [ + (v: string) => !!v || 'Field is required.', +] diff --git a/client/src/views/CalendarView.vue b/client/src/views/CalendarView.vue index 07e77a08..3f3dd7cf 100644 --- a/client/src/views/CalendarView.vue +++ b/client/src/views/CalendarView.vue @@ -1,10 +1,19 @@ From 4695b42863cfa84877b05c8bd318f32df24587d6 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Thu, 18 Jan 2024 03:04:27 +0200 Subject: [PATCH 03/31] Adding events, meetings and vacations to calender --- client/src/clients/api/event.ts | 11 +- client/src/clients/api/meeting.ts | 10 +- client/src/clients/api/vacations.ts | 16 +- client/src/components/calender.vue | 235 ++++++++++++++++-- client/src/components/calenderRequest.vue | 34 ++- client/src/components/cards/eventCard.vue | 92 +++++++ client/src/components/cards/meetingCard.vue | 79 ++++++ client/src/components/cards/vacationCard.vue | 29 +++ client/src/components/personalInformation.vue | 1 - .../src/components/requests/eventRequest.vue | 76 ++++-- .../src/components/requests/leaveRequest.vue | 126 ++++++---- .../components/requests/meetingRequest.vue | 38 ++- client/src/types/api.ts | 92 ++++++- client/src/views/CalendarView.vue | 4 +- client/src/views/VacationView.vue | 11 + 15 files changed, 722 insertions(+), 132 deletions(-) create mode 100644 client/src/components/cards/eventCard.vue create mode 100644 client/src/components/cards/meetingCard.vue create mode 100644 client/src/components/cards/vacationCard.vue create mode 100644 client/src/views/VacationView.vue diff --git a/client/src/clients/api/event.ts b/client/src/clients/api/event.ts index ce017720..3a757a1c 100644 --- a/client/src/clients/api/event.ts +++ b/client/src/clients/api/event.ts @@ -12,15 +12,16 @@ export class EventApi extends ApiClientBase { this.exact = new EventExactApi(options, this.path) } - async list() {} + async list(query?: any) { + return this.unwrap(this.$http.get>(this.getUrl('', query)), { + transform: (d) => d.results + }) + } async create(input: Api.Inputs.Event) { ApiClientBase.assertUser() - - console.log("input",input); - const event = await this.unwrap( - this.$http.post(this.getUrl('', input)), + this.$http.post(this.getUrl(''), input), { transform: (d) => d.results } ) diff --git a/client/src/clients/api/meeting.ts b/client/src/clients/api/meeting.ts index 8a6252c6..595b9432 100644 --- a/client/src/clients/api/meeting.ts +++ b/client/src/clients/api/meeting.ts @@ -12,13 +12,15 @@ export class MeetingApi extends ApiClientBase { this.exact = new MeetingExactApi(options) } - async list() {} + list(query?: any) { + return this.unwrap(this.$http.get>(this.getUrl('', query)), { + transform: (d) => d.results + }) + } async create(input: Api.Inputs.Meeting) { ApiClientBase.assertUser() - - const event = await this.unwrap( - this.$http.post(this.getUrl('', input)), + this.$http.post(this.getUrl(''),input), { transform: (d) => d.results } ) diff --git a/client/src/clients/api/vacations.ts b/client/src/clients/api/vacations.ts index 6b84937f..4abe6f90 100644 --- a/client/src/clients/api/vacations.ts +++ b/client/src/clients/api/vacations.ts @@ -36,8 +36,15 @@ export class VacationsApi extends ApiClientBase { } async list() {} - async create() {} + async create(input: Api.Inputs.Leave) { + ApiClientBase.assertUser() + const event = await this.unwrap( + this.$http.post(this.getUrl(''), input), + { transform: (d) => d.results } + ) + return event + } async read(id: number) {} async delete(id: number) {} @@ -110,5 +117,10 @@ class VacationsGetAdminBalanceApi extends ApiClientBase { class VacationsUserApi extends ApiClientBase { protected readonly path = '/user' - async list() {} + async list(query?: any) { + return this.unwrap(this.$http.get>(this.getUrl('', query)), { + transform: (d) => d.results + }) + } + } diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 36bc1077..6b2b0b97 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -5,11 +5,31 @@ - - mdi-eye + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/components/cards/meetingCard.vue b/client/src/components/cards/meetingCard.vue new file mode 100644 index 00000000..f1d37e00 --- /dev/null +++ b/client/src/components/cards/meetingCard.vue @@ -0,0 +1,79 @@ + + + diff --git a/client/src/components/cards/vacationCard.vue b/client/src/components/cards/vacationCard.vue new file mode 100644 index 00000000..bd90161e --- /dev/null +++ b/client/src/components/cards/vacationCard.vue @@ -0,0 +1,29 @@ + + + diff --git a/client/src/components/personalInformation.vue b/client/src/components/personalInformation.vue index 9b135d34..932be9af 100644 --- a/client/src/components/personalInformation.vue +++ b/client/src/components/personalInformation.vue @@ -43,7 +43,6 @@ export default { const getUserInfo = (dataKey: any) => { if (props.user) { country.value = props.user.location.country; - console.log(country.value); } if (props.user && props.user[dataKey]) { return props.user[dataKey]; diff --git a/client/src/components/requests/eventRequest.vue b/client/src/components/requests/eventRequest.vue index 1ba212bb..3a78900c 100644 --- a/client/src/components/requests/eventRequest.vue +++ b/client/src/components/requests/eventRequest.vue @@ -1,7 +1,6 @@ + \ No newline at end of file From 0dfa711dcdb44dcc24e85374f620d49fde993ca8 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Thu, 18 Jan 2024 12:19:52 +0200 Subject: [PATCH 04/31] vacation card --- client/src/components/cards/vacationCard.vue | 62 +++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/client/src/components/cards/vacationCard.vue b/client/src/components/cards/vacationCard.vue index bd90161e..58ee2f02 100644 --- a/client/src/components/cards/vacationCard.vue +++ b/client/src/components/cards/vacationCard.vue @@ -1,10 +1,68 @@ From 67ee3e5e91282fd3aefec2d8a6a954b2a81cb65c Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 21 Jan 2024 19:23:37 +0200 Subject: [PATCH 08/31] forms styling --- client/src/components/calender.vue | 10 +- client/src/components/calenderRequest.vue | 10 +- client/src/components/cards/eventCard.vue | 7 +- client/src/components/cards/meetingCard.vue | 5 +- client/src/components/cards/vacationCard.vue | 98 ++++++++++--------- .../src/components/requests/eventRequest.vue | 22 +---- .../src/components/requests/leaveRequest.vue | 5 +- .../components/requests/meetingRequest.vue | 25 ++--- 8 files changed, 82 insertions(+), 100 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index c90c9b98..c4290def 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -11,7 +11,7 @@ /> - - + - + - mdi-close - - +
+ mdi-close +
+
+ {{ tab }} +
+ diff --git a/client/src/components/cards/eventCard.vue b/client/src/components/cards/eventCard.vue index 540cab07..1872819f 100644 --- a/client/src/components/cards/eventCard.vue +++ b/client/src/components/cards/eventCard.vue @@ -1,7 +1,8 @@ + + + \ No newline at end of file diff --git a/client/src/components/requests/leaveRequest.vue b/client/src/components/requests/leaveRequest.vue index a751c9aa..e7cd4135 100644 --- a/client/src/components/requests/leaveRequest.vue +++ b/client/src/components/requests/leaveRequest.vue @@ -85,12 +85,20 @@ export default { }, ]) - function getDaysBetweenDates(date1: Date, date2: Date): number { + // function getDaysBetweenDates(date1: Date, date2: Date): number { - const timeDifference = Math.abs(date2.getTime() - date1.getTime()); - const daysDifference = Math.ceil(timeDifference / (1000 * 3600 * 24)); - return daysDifference; - } + // const timeDifference = Math.abs(date2.getTime() - date1.getTime()); + // const daysDifference = Math.ceil(timeDifference / (1000 * 3600 * 24)); + // return daysDifference; + // } + + // async function calculateActualDays() { + // return await $api.vacations.calculate.list({ + // start_date: startDate.value, + // end_date: endDate.value, + // } + // ) + // } async function createLeave() { if (leaveReason.value) { @@ -99,7 +107,11 @@ export default { reason: leaveReason.value?.reason, from_date: startDate.value, end_date: endDate.value, - actual_days: getDaysBetweenDates(props.dates.start, props.dates.start), + actual_days: await $api.vacations.calculate.list({ + start_date: props.dates.start, + end_date: props.dates.start, + } + ), }, ) diff --git a/client/src/types/api.ts b/client/src/types/api.ts index 583fc288..e83fda76 100644 --- a/client/src/types/api.ts +++ b/client/src/types/api.ts @@ -20,6 +20,7 @@ export module Api { export interface UnwrapOptions { transform?: (data: T, res: AxiosResponse) => R normalizeError?: (error: AxiosError, res: AxiosResponse) => string + disableNotify?: boolean } export interface Skill { From b2bdf188bb63726741d3ee900bec1f506771b3dd Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Mon, 22 Jan 2024 15:12:18 +0200 Subject: [PATCH 10/31] feat: Add background to events in calender --- client/src/components/calender.vue | 128 +++++++++++++++-------------- 1 file changed, 67 insertions(+), 61 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 5593b2ea..eccb99e1 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -3,7 +3,6 @@ - @@ -11,36 +10,55 @@ - -
- + +
- + - + - + - + @@ -57,11 +75,10 @@ import meetingCard from '@/components/cards/meetingCard.vue' import eventCard from '@/components/cards/eventCard.vue' import vacationCard from '@/components/cards/vacationCard.vue' -import { ref, computed, watchEffect } from 'vue' +import { ref, watchEffect } from 'vue' import type { Api } from '@/types' import { useApi } from '@/hooks' -import type { EventClickArg } from '@fullcalendar/core/index.js' -import type { CalendarApi } from '@fullcalendar/core/index.js' +import type { EventClickArg, CalendarApi, DayCellMountArg } from '@fullcalendar/core/index.js' import { useAsyncState } from '@vueuse/core' function handelDates(start: any, end: any): any { @@ -85,15 +102,15 @@ function handelDates(start: any, end: any): any { dates.start = new Date(dates.start) const endStr = `${endDate.getFullYear()}-${endDate.getMonth() + 1}-${endDate.getDate()}` - const startStr = `${dates.start.getFullYear()}-${dates.start.getMonth() + 1 - }-${dates.start.getDate()}` + const startStr = `${dates.start.getFullYear()}-${ + dates.start.getMonth() + 1 + }-${dates.start.getDate()}` dates.endStr = endStr dates.startStr = startStr return dates } - function normalizeEvent(e: Api.Inputs.Event): any { const dates = handelDates(e.from_date, e.end_date) @@ -103,10 +120,10 @@ function normalizeEvent(e: Api.Inputs.Event): any { color: 'primary', start: dates.start, end: dates.end, - backgroundColor: 'offwhite', + // backgroundColor: 'offwhite', + // backgroundColor: 'red', id: e.name, allDay: true - } } @@ -124,7 +141,6 @@ function normalizeMeeting(m: Api.Meetings): any { } } - export default { name: 'calenderCshr', components: { @@ -164,7 +180,7 @@ export default { async function normalizeVacation(v: Api.Vacation): Promise { const dates = handelDates(v.from_date, v.end_date) - const applyingUser = await getUser(v.applying_user); + const applyingUser = await getUser(v.applying_user) return { title: `${applyingUser}'s Vacation`, @@ -201,41 +217,36 @@ export default { } const normalizeVacationAsync = async (vacation: any) => { - return await normalizeVacation(vacation); - }; + return await normalizeVacation(vacation) + } const plugins = [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin] as any - const eventsOption = ref([] as Array); + const eventsOption = ref([] as Array) watchEffect(async () => { - const normalizedMeetings = selected.value.meetings ? meetings.state.value.map(normalizeMeeting) : []; - const normalizedEvents = selected.value.events ? events.state.value.map(normalizeEvent) : []; - const normalizedVacations = selected.value.vacations ? await Promise.all(vacations.state.value.map(normalizeVacationAsync)) : []; - - eventsOption.value = [...normalizedMeetings, ...normalizedEvents, ...normalizedVacations]; - }); - - - - // const dayCellDidMountOption = computed(() => { - // return ({ date, el }: { date: Date; el: HTMLElement }) => { - // console.log("eventsOption.value", eventsOption.value); - // const eventDates = eventsOption.value.map(event => new Date(event.start)); - // const isEventDate = eventDates.some(eventDate => - // eventDate.getDate() === date.getDate() && eventDate.getMonth() === date.getMonth() - // ); - - // if (isEventDate) { - // el.style.backgroundColor = 'white'; - // } - // }; - // }); - - function dayCellDidMountOption({ date, el }: { date: Date; el: HTMLElement }){ - console.log("el ",el) - - console.log("el ",el && el.querySelector(".cshr-event")) - + const normalizedMeetings = selected.value.meetings + ? meetings.state.value.map(normalizeMeeting) + : [] + const normalizedEvents = selected.value.events ? events.state.value.map(normalizeEvent) : [] + const normalizedVacations = selected.value.vacations + ? await Promise.all(vacations.state.value.map(normalizeVacationAsync)) + : [] + + eventsOption.value = [...normalizedMeetings, ...normalizedEvents, ...normalizedVacations] + }) + + function dayCellDidMount({ el, date }: DayCellMountArg) { + for (const event of events.state.value) { + const current = date.getTime() + const start = new Date(event.from_date).getTime() - 86_400_000 + const end = new Date(event.end_date).getTime() + + const shouldUpdate = current >= start && current <= end + if (shouldUpdate) { + el.style.backgroundColor = 'rgba(255, 255, 255, 0.05)' + return + } + } } async function getUser(id: any) { @@ -256,13 +267,9 @@ export default { weekends: true, select: onSelect, eventClick: onClick, - editable: false, - // dayCellDidMount: dayCellDidMountOption - - + editable: false } - function closeDialog(id: string | number) { isViewRequest.value, isEvent.value, isMeeting.value, (isLeave.value = false) event.value, meeting.value, (dates.value = undefined) @@ -290,7 +297,7 @@ export default { dates, vacation, selected, - dayCellDidMountOption, + dayCellDidMount, closeDialog, openDialog, onSelect, @@ -305,11 +312,10 @@ export default { } - \ No newline at end of file + From 66758ff773aad1c3355be999b02052977392d9db Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Mon, 22 Jan 2024 15:25:04 +0200 Subject: [PATCH 11/31] feat: Remove watchEffect from loading users --- client/src/components/calender.vue | 41 ++++++++++++++++++++---------- client/src/types/api.ts | 1 + 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index eccb99e1..265dc486 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -75,7 +75,7 @@ import meetingCard from '@/components/cards/meetingCard.vue' import eventCard from '@/components/cards/eventCard.vue' import vacationCard from '@/components/cards/vacationCard.vue' -import { ref, watchEffect } from 'vue' +import { ref, computed } from 'vue' import type { Api } from '@/types' import { useApi } from '@/hooks' import type { EventClickArg, CalendarApi, DayCellMountArg } from '@fullcalendar/core/index.js' @@ -155,7 +155,27 @@ export default { const $api = useApi() const meetings = useAsyncState($api.meeting.list(), []) const events = useAsyncState($api.event.list(), []) - const vacations = useAsyncState($api.vacations.list(), []) + useAsyncState($api.vacations.list(), [], { + onSuccess(data) { + vacations.execute(undefined, data) + } + }) + + const vacations = useAsyncState( + async (vacations: Api.Vacation[]) => { + const ids = vacations.map((v) => v.applying_user) + const users = await Promise.all( + ids.map((id) => $api.users.getuser(id, { disableNotify: true })) + ) + + return vacations.map((v, i) => { + v.user = users[i] + return v + }) + }, + [], + { immediate: false } + ) const meeting = ref() const isViewRequest = ref(false) @@ -177,13 +197,11 @@ export default { openDialog(arg.startStr) } - async function normalizeVacation(v: Api.Vacation): Promise { + function normalizeVacation(v: Api.Vacation) { const dates = handelDates(v.from_date, v.end_date) - const applyingUser = await getUser(v.applying_user) - return { - title: `${applyingUser}'s Vacation`, + title: `${v.user!.full_name}'s Vacation`, color: 'primary', start: dates.start, end: dates.end, @@ -216,23 +234,18 @@ export default { isViewRequest.value = true } - const normalizeVacationAsync = async (vacation: any) => { - return await normalizeVacation(vacation) - } - const plugins = [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin] as any - const eventsOption = ref([] as Array) - watchEffect(async () => { + const eventsOption = computed(() => { const normalizedMeetings = selected.value.meetings ? meetings.state.value.map(normalizeMeeting) : [] const normalizedEvents = selected.value.events ? events.state.value.map(normalizeEvent) : [] const normalizedVacations = selected.value.vacations - ? await Promise.all(vacations.state.value.map(normalizeVacationAsync)) + ? vacations.state.value.map(normalizeVacation) : [] - eventsOption.value = [...normalizedMeetings, ...normalizedEvents, ...normalizedVacations] + return [...normalizedMeetings, ...normalizedEvents, ...normalizedVacations] }) function dayCellDidMount({ el, date }: DayCellMountArg) { diff --git a/client/src/types/api.ts b/client/src/types/api.ts index e83fda76..3338a0da 100644 --- a/client/src/types/api.ts +++ b/client/src/types/api.ts @@ -40,6 +40,7 @@ export module Api { actual_days: number applying_user: number approval_user: number + user?: Api.User } export interface LeaveReason { From 34dee5bec09d0088adb4dd8bed43c5d8d4d715fb Mon Sep 17 00:00:00 2001 From: mayar osama Date: Mon, 22 Jan 2024 15:39:44 +0200 Subject: [PATCH 12/31] removing getuser method and moving methods to helpers --- client/src/components/calender.vue | 133 ++++------------------------- client/src/utils/helpers.ts | 80 ++++++++++++++++- 2 files changed, 92 insertions(+), 121 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 265dc486..263c1626 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -13,52 +13,32 @@
- +
- + - + - + - + @@ -80,66 +60,10 @@ import type { Api } from '@/types' import { useApi } from '@/hooks' import type { EventClickArg, CalendarApi, DayCellMountArg } from '@fullcalendar/core/index.js' import { useAsyncState } from '@vueuse/core' +import { normalizeEvent, normalizeVacation, normalizeMeeting } from '@/utils' -function handelDates(start: any, end: any): any { - const dates = { - start, - end, - add: true, - cut: null, - endStr: null as null | string | Date, - startStr: null as null | string | Date - } - - const endDate = new Date(dates.end || '') - if (dates.cut) { - endDate.setDate(endDate.getDate() - 1) - } else if (dates.add) { - endDate.setDate(endDate.getDate() + 1) - } - dates.end = endDate - dates.start = new Date(dates.start) - - const endStr = `${endDate.getFullYear()}-${endDate.getMonth() + 1}-${endDate.getDate()}` - const startStr = `${dates.start.getFullYear()}-${ - dates.start.getMonth() + 1 - }-${dates.start.getDate()}` - - dates.endStr = endStr - dates.startStr = startStr - return dates -} -function normalizeEvent(e: Api.Inputs.Event): any { - const dates = handelDates(e.from_date, e.end_date) - - return { - title: 'Event', - classNames: ['cshr-event'], - color: 'primary', - start: dates.start, - end: dates.end, - // backgroundColor: 'offwhite', - // backgroundColor: 'red', - id: e.name, - allDay: true - } -} - -function normalizeMeeting(m: Api.Meetings): any { - const dates = handelDates(m.date, m.date) - - return { - title: 'Meeting', - color: 'secondary', - start: dates.start, - end: dates.end, - backgroundColor: 'primary', - id: m.id, - allDay: true - } -} export default { name: 'calenderCshr', @@ -197,19 +121,7 @@ export default { openDialog(arg.startStr) } - function normalizeVacation(v: Api.Vacation) { - const dates = handelDates(v.from_date, v.end_date) - return { - title: `${v.user!.full_name}'s Vacation`, - color: 'primary', - start: dates.start, - end: dates.end, - backgroundColor: 'gray', - id: v.id.toString(), - allDay: true - } - } const onClick = async (arg: EventClickArg) => { calendar.value = arg.view.calendar @@ -235,7 +147,6 @@ export default { } const plugins = [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin] as any - const eventsOption = computed(() => { const normalizedMeetings = selected.value.meetings ? meetings.state.value.map(normalizeMeeting) @@ -249,10 +160,11 @@ export default { }) function dayCellDidMount({ el, date }: DayCellMountArg) { - for (const event of events.state.value) { + console.log("eventsOption" ,eventsOption.value) + for (const event of eventsOption.value) { const current = date.getTime() - const start = new Date(event.from_date).getTime() - 86_400_000 - const end = new Date(event.end_date).getTime() + const start = new Date(event.start).getTime() - 86_400_000 + const end = new Date(event.end).getTime() const shouldUpdate = current >= start && current <= end if (shouldUpdate) { @@ -262,11 +174,6 @@ export default { } } - async function getUser(id: any) { - const user = await $api.users.getuser(id, { disableNotify: true }) - return user.first_name - } - const options = { plugins, dayMaxEvents: true, @@ -297,7 +204,6 @@ export default { events, meetings, vacations, - isViewRequest, isEvent, isLeave, @@ -315,7 +221,6 @@ export default { openDialog, onSelect, onClick, - getUser, calenderRequest, meetingCard, eventCard, @@ -323,12 +228,4 @@ export default { } } } - - - + \ No newline at end of file diff --git a/client/src/utils/helpers.ts b/client/src/utils/helpers.ts index 44a04116..a82d5390 100644 --- a/client/src/utils/helpers.ts +++ b/client/src/utils/helpers.ts @@ -1,3 +1,5 @@ +import type { Api } from "@/types" + export async function resolve(promise: Promise): Promise<[T, any]> { try { return [await promise, null] @@ -25,6 +27,78 @@ export const passwordRules = [ (v: string) => v.length > 3 || 'Password must be more than 3 characters.' ] -export const fieldRequired = [ - (v: string) => !!v || 'Field is required.', -] +export const fieldRequired = [(v: string) => !!v || 'Field is required.'] + +export function handelDates(start: any, end: any): any { + const dates = { + start, + end, + add: true, + cut: null, + endStr: null as null | string | Date, + startStr: null as null | string | Date + } + + const endDate = new Date(dates.end || '') + if (dates.cut) { + endDate.setDate(endDate.getDate() - 1) + } else if (dates.add) { + endDate.setDate(endDate.getDate() + 1) + } + + dates.end = endDate + dates.start = new Date(dates.start) + + const endStr = `${endDate.getFullYear()}-${endDate.getMonth() + 1}-${endDate.getDate()}` + const startStr = `${dates.start.getFullYear()}-${ + dates.start.getMonth() + 1 + }-${dates.start.getDate()}` + + dates.endStr = endStr + dates.startStr = startStr + return dates +} + + +export function normalizeEvent(e: Api.Inputs.Event): any { + const dates = handelDates(e.from_date, e.end_date) + + return { + title: 'Event', + classNames: ['cshr-event'], + color: 'primary', + start: dates.start, + end: dates.end, + // backgroundColor: 'offwhite', + // backgroundColor: 'red', + id: e.name, + allDay: true + } +} +export function normalizeVacation(v: Api.Vacation) { + const dates = handelDates(v.from_date, v.end_date) + + return { + title: `${v.user!.full_name}'s Vacation`, + color: 'primary', + start: dates.start, + end: dates.end, + backgroundColor: 'gray', + id: v.id.toString(), + allDay: true + } +} + +export function normalizeMeeting(m: Api.Meetings): any { + const dates = handelDates(m.date, m.date) + + return { + title: 'Meeting', + color: 'secondary', + start: dates.start, + end: dates.end, + backgroundColor: 'primary', + id: m.id, + allDay: true + } +} From fe1311db7abce1394b63ec0b7c2484b022c5f3c6 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Mon, 22 Jan 2024 16:02:04 +0200 Subject: [PATCH 13/31] Fixing build errors --- client/package.json | 8 +- client/pnpm-lock.yaml | 128 +++++++++---------- client/src/components/cards/vacationCard.vue | 2 +- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/client/package.json b/client/package.json index c246c64f..f8f19499 100644 --- a/client/package.json +++ b/client/package.json @@ -26,7 +26,7 @@ "axios": "^1.6.3", "calendar_options": "link:@fullcalendar/core/calendar_options", "pinia": "^2.1.7", - "vue": "^3.2.0", + "vue": "^3.3.11", "vue-router": "^4.2.5", "vue3-notifier": "^1.0.2", "vuetify": "^3.4.9" @@ -42,13 +42,13 @@ "@vue/eslint-config-typescript": "^12.0.0", "@vue/test-utils": "^2.4.3", "@vue/tsconfig": "^0.5.0", - "eslint": "^8.37.0", - "eslint-plugin-vue": "^9.10.0", + "eslint": "^8.49.0", + "eslint-plugin-vue": "^9.17.0", "jsdom": "^23.0.1", "npm-run-all2": "^6.1.1", "prettier": "^3.0.3", "sass": "^1.69.6", - "typescript": "~4.8.4", + "typescript": "~5.3.0", "vite": "^5.0.10", "vite-plugin-vuetify": "^2.0.1", "vitest": "^1.0.4", diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 1bbacdd2..41146ad1 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -40,19 +40,19 @@ dependencies: version: link:@fullcalendar/core/calendar_options pinia: specifier: ^2.1.7 - version: 2.1.7(typescript@4.8.4)(vue@3.4.3) + version: 2.1.7(typescript@5.3.3)(vue@3.4.3) vue: - specifier: ^3.2.0 - version: 3.4.3(typescript@4.8.4) + specifier: ^3.3.11 + version: 3.4.3(typescript@5.3.3) vue-router: specifier: ^4.2.5 version: 4.2.5(vue@3.4.3) vue3-notifier: specifier: ^1.0.2 - version: 1.0.2(typescript@4.8.4) + version: 1.0.2(typescript@5.3.3) vuetify: specifier: ^3.4.9 - version: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + version: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) devDependencies: '@faker-js/faker': @@ -78,7 +78,7 @@ devDependencies: version: 8.0.0(eslint@8.56.0)(prettier@3.1.1) '@vue/eslint-config-typescript': specifier: ^12.0.0 - version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@4.8.4) + version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3) '@vue/test-utils': specifier: ^2.4.3 version: 2.4.3(vue@3.4.3) @@ -86,10 +86,10 @@ devDependencies: specifier: ^0.5.0 version: 0.5.1 eslint: - specifier: ^8.37.0 + specifier: ^8.49.0 version: 8.56.0 eslint-plugin-vue: - specifier: ^9.10.0 + specifier: ^9.17.0 version: 9.19.2(eslint@8.56.0) jsdom: specifier: ^23.0.1 @@ -104,8 +104,8 @@ devDependencies: specifier: ^1.69.6 version: 1.69.6 typescript: - specifier: ~4.8.4 - version: 4.8.4 + specifier: ~5.3.0 + version: 5.3.3 vite: specifier: ^5.0.10 version: 5.0.10(@types/node@18.19.4)(sass@1.69.6) @@ -117,7 +117,7 @@ devDependencies: version: 1.1.1(@types/node@18.19.4)(jsdom@23.0.1)(sass@1.69.6) vue-tsc: specifier: ^1.8.25 - version: 1.8.27(typescript@4.8.4) + version: 1.8.27(typescript@5.3.3) packages: @@ -438,7 +438,7 @@ packages: vue: ^3.0.11 dependencies: '@fullcalendar/core': 6.1.10 - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) dev: false /@humanwhocodes/config-array@0.11.13: @@ -660,7 +660,7 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: false - /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@4.8.4): + /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -672,10 +672,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/scope-manager': 6.16.0 - '@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) - '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.16.0 debug: 4.3.4 eslint: 8.56.0 @@ -683,13 +683,13 @@ packages: ignore: 5.3.0 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@4.8.4) - typescript: 4.8.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@4.8.4): + /@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -701,11 +701,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.16.0 '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.16.0 debug: 4.3.4 eslint: 8.56.0 - typescript: 4.8.4 + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -718,7 +718,7 @@ packages: '@typescript-eslint/visitor-keys': 6.16.0 dev: true - /@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@4.8.4): + /@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -728,12 +728,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) - '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.56.0 - ts-api-utils: 1.0.3(typescript@4.8.4) - typescript: 4.8.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -743,7 +743,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.16.0(typescript@4.8.4): + /@typescript-eslint/typescript-estree@6.16.0(typescript@5.3.3): resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -759,13 +759,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@4.8.4) - typescript: 4.8.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@4.8.4): + /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -776,7 +776,7 @@ packages: '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 6.16.0 '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -804,7 +804,7 @@ packages: vue: ^3.2.25 dependencies: vite: 5.0.10(@types/node@18.19.4)(sass@1.69.6) - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) dev: true /@vitest/expect@1.1.1: @@ -916,7 +916,7 @@ packages: - '@types/eslint' dev: true - /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@4.8.4): + /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: @@ -927,17 +927,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@4.8.4) - '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-plugin-vue: 9.19.2(eslint@8.56.0) - typescript: 4.8.4 + typescript: 5.3.3 vue-eslint-parser: 9.3.2(eslint@8.56.0) transitivePeerDependencies: - supports-color dev: true - /@vue/language-core@1.8.27(typescript@4.8.4): + /@vue/language-core@1.8.27(typescript@5.3.3): resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} peerDependencies: typescript: '*' @@ -953,7 +953,7 @@ packages: minimatch: 9.0.3 muggle-string: 0.3.1 path-browserify: 1.0.1 - typescript: 4.8.4 + typescript: 5.3.3 vue-template-compiler: 2.7.16 dev: true @@ -982,7 +982,7 @@ packages: dependencies: '@vue/compiler-ssr': 3.4.3 '@vue/shared': 3.4.3 - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) /@vue/shared@3.4.3: resolution: {integrity: sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==} @@ -997,7 +997,7 @@ packages: optional: true dependencies: js-beautify: 1.14.11 - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) vue-component-type-helpers: 1.8.27 dev: true @@ -1012,8 +1012,8 @@ packages: vuetify: ^3.0.0 dependencies: upath: 2.0.1 - vue: 3.4.3(typescript@4.8.4) - vuetify: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + vue: 3.4.3(typescript@5.3.3) + vuetify: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) /@vueuse/core@10.7.1(vue@3.4.3): resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} @@ -2382,7 +2382,7 @@ packages: hasBin: true dev: true - /pinia@2.1.7(typescript@4.8.4)(vue@3.4.3): + /pinia@2.1.7(typescript@5.3.3)(vue@3.4.3): resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} peerDependencies: '@vue/composition-api': ^1.4.0 @@ -2395,8 +2395,8 @@ packages: optional: true dependencies: '@vue/devtools-api': 6.5.1 - typescript: 4.8.4 - vue: 3.4.3(typescript@4.8.4) + typescript: 5.3.3 + vue: 3.4.3(typescript@5.3.3) vue-demi: 0.14.6(vue@3.4.3) dev: false @@ -2762,13 +2762,13 @@ packages: punycode: 2.3.1 dev: true - /ts-api-utils@1.0.3(typescript@4.8.4): + /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 4.8.4 + typescript: 5.3.3 dev: true /tslib@2.6.2: @@ -2802,9 +2802,9 @@ packages: engines: {node: '>=16'} dev: true - /typescript@4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} - engines: {node: '>=4.2.0'} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} hasBin: true /ufo@1.3.2: @@ -2880,8 +2880,8 @@ packages: debug: 4.3.4 upath: 2.0.1 vite: 5.0.10(@types/node@18.19.4)(sass@1.69.6) - vue: 3.4.3(typescript@4.8.4) - vuetify: 3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) + vue: 3.4.3(typescript@5.3.3) + vuetify: 3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3) transitivePeerDependencies: - supports-color @@ -2995,7 +2995,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) dev: false /vue-eslint-parser@9.3.2(eslint@8.56.0): @@ -3022,7 +3022,7 @@ packages: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) dev: false /vue-template-compiler@2.7.16: @@ -3032,29 +3032,29 @@ packages: he: 1.2.0 dev: true - /vue-tsc@1.8.27(typescript@4.8.4): + /vue-tsc@1.8.27(typescript@5.3.3): resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} hasBin: true peerDependencies: typescript: '*' dependencies: '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@4.8.4) + '@vue/language-core': 1.8.27(typescript@5.3.3) semver: 7.5.4 - typescript: 4.8.4 + typescript: 5.3.3 dev: true - /vue3-notifier@1.0.2(typescript@4.8.4): + /vue3-notifier@1.0.2(typescript@5.3.3): resolution: {integrity: sha512-o/RlQhA4N7WYO5mtwHCJE04CgSUGUbpF++1nyGWgPw9v5QDQGzf85XTygQq2m0LJcVBMLo6D9v/YDkUl5gtYTw==} dependencies: chalk: 5.3.0 gsap: 3.12.4 - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) transitivePeerDependencies: - typescript dev: false - /vue@3.4.3(typescript@4.8.4): + /vue@3.4.3(typescript@5.3.3): resolution: {integrity: sha512-GjN+culMAGv/mUbkIv8zMKItno8npcj5gWlXkSxf1SPTQf8eJ4A+YfHIvQFyL1IfuJcMl3soA7SmN1fRxbf/wA==} peerDependencies: typescript: '*' @@ -3067,9 +3067,9 @@ packages: '@vue/runtime-dom': 3.4.3 '@vue/server-renderer': 3.4.3(vue@3.4.3) '@vue/shared': 3.4.3 - typescript: 4.8.4 + typescript: 5.3.3 - /vuetify@3.4.9(typescript@4.8.4)(vite-plugin-vuetify@2.0.1)(vue@3.4.3): + /vuetify@3.4.9(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.3): resolution: {integrity: sha512-pgBPdbgrHHHZWRybWevzRFezMax6CP2MccTivjOZSOF0XsnzoNOJGGpkTgIfBrk4UCp9jKx6JOJIztGtx/IcSw==} engines: {node: ^12.20 || >=14.13} peerDependencies: @@ -3088,9 +3088,9 @@ packages: webpack-plugin-vuetify: optional: true dependencies: - typescript: 4.8.4 + typescript: 5.3.3 vite-plugin-vuetify: 2.0.1(vite@5.0.10)(vue@3.4.3)(vuetify@3.4.9) - vue: 3.4.3(typescript@4.8.4) + vue: 3.4.3(typescript@5.3.3) /w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} diff --git a/client/src/components/cards/vacationCard.vue b/client/src/components/cards/vacationCard.vue index 32527a31..073098e5 100644 --- a/client/src/components/cards/vacationCard.vue +++ b/client/src/components/cards/vacationCard.vue @@ -157,7 +157,7 @@ export default { }, ]) - const readOnly = ref(true) + const readOnly = ref(true) const couldApprove = computed(() => { if (state.user.value.user_type === 'Admin' || state.user.value.user_type === 'Supervisor' From d955b85767248b2fe4cbef886640b99d5c3b70cf Mon Sep 17 00:00:00 2001 From: mayar osama Date: Tue, 23 Jan 2024 14:20:32 +0200 Subject: [PATCH 14/31] useAsync state in calender --- client/src/components/calender.vue | 11 ++++- client/src/components/cards/vacationCard.vue | 37 ++++++++-------- .../src/components/requests/eventRequest.vue | 7 +++- .../src/components/requests/leaveRequest.vue | 42 +++++++------------ .../components/requests/meetingRequest.vue | 5 ++- client/src/types/api.ts | 4 +- 6 files changed, 55 insertions(+), 51 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 263c1626..c4731614 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -160,7 +160,6 @@ export default { }) function dayCellDidMount({ el, date }: DayCellMountArg) { - console.log("eventsOption" ,eventsOption.value) for (const event of eventsOption.value) { const current = date.getTime() const start = new Date(event.start).getTime() - 86_400_000 @@ -196,6 +195,15 @@ export default { showDialog.value[id] = false } + // function removeVacation(id: number) { + // console.log("Removing", id) + // console.log("Removing meeting", meetings.state.value ) + // // vacations.state.value = vacations.state.value.filter(vacations.state.value.id === id) + // // isViewRequest.value, isEvent.value, isMeeting.value, (isLeave.value = false) + // // event.value, meeting.value, (dates.value = undefined) + // // showDialog.value[id] = false + // } + async function openDialog(id: string | number) { showDialog.value[id] = true } @@ -221,6 +229,7 @@ export default { openDialog, onSelect, onClick, + // removeVacation, calenderRequest, meetingCard, eventCard, diff --git a/client/src/components/cards/vacationCard.vue b/client/src/components/cards/vacationCard.vue index 073098e5..07a3df9b 100644 --- a/client/src/components/cards/vacationCard.vue +++ b/client/src/components/cards/vacationCard.vue @@ -91,15 +91,16 @@ Cancel - - Submit + + Submit
- + Approve Reject @@ -120,8 +121,9 @@ import { useAsyncState } from '@vueuse/core'; export default { name: "vacationCard", props: ["vacation"], - emits: { - 'close-dialog': (item: Boolean) => item + emits: { + 'close-dialog': (item: Boolean) => item, + // 'update-event': (item: number) => item }, setup(props) { @@ -183,24 +185,22 @@ export default { } return true; } - async function handleDelete() { - return await $api.vacations.delete(props.vacation.id) + return useAsyncState($api.vacations.delete(props.vacation.id), []) } async function handleApprove() { - return await $api.vacations.approve.update(props.vacation.id - ) + return useAsyncState($api.vacations.approve.update(props.vacation.id), []) } async function handleReject() { - return await $api.vacations.reject.update(props.vacation.id) + return useAsyncState($api.vacations.reject.update(props.vacation.id), []) } - async function calculateActualDays() { - return await $api.vacations.calculate.list({ + async function calculateActualDays() { + return useAsyncState($api.vacations.calculate.list({ start_date: startDate.value, end_date: endDate.value, } - ) + ), [] ) } function transformString(inputString: string): string { const words = inputString.split('_'); @@ -212,15 +212,18 @@ export default { async function updateVacation() { - const actualDays = await calculateActualDays() - await $api.vacations.edit.update(props.vacation.id, + // calculateActualDays() + const actualDays =await calculateActualDays() + + useAsyncState($api.vacations.edit.update(props.vacation.id, { reason: leaveReason.value.reason, from_date: startDate.value, end_date: endDate.value, - actual_days: actualDays + actual_days: actualDays.state.value }, - ) + ), []) + } diff --git a/client/src/components/requests/eventRequest.vue b/client/src/components/requests/eventRequest.vue index b083e151..147fcb0a 100644 --- a/client/src/components/requests/eventRequest.vue +++ b/client/src/components/requests/eventRequest.vue @@ -73,6 +73,7 @@ import { computed, ref } from 'vue'; import { fieldRequired } from '@/utils'; import { useApi } from '@/hooks' +import { useAsyncState } from '@vueuse/core'; export default { @@ -111,14 +112,16 @@ export default { async function createEvent() { - await $api.event.create( + useAsyncState($api.event.create( { name: name.value, description: description.value, from_date: from_date.value, end_date: end_date.value, }, - ) + ), []) + + } return { diff --git a/client/src/components/requests/leaveRequest.vue b/client/src/components/requests/leaveRequest.vue index e7cd4135..7ffbb40e 100644 --- a/client/src/components/requests/leaveRequest.vue +++ b/client/src/components/requests/leaveRequest.vue @@ -31,7 +31,7 @@ - + Submit @@ -41,6 +41,7 @@ diff --git a/client/src/components/cards/holidayCard.vue b/client/src/components/cards/holidayCard.vue new file mode 100644 index 00000000..d0264091 --- /dev/null +++ b/client/src/components/cards/holidayCard.vue @@ -0,0 +1,39 @@ + + diff --git a/client/src/components/requests/leaveRequest.vue b/client/src/components/requests/leaveRequest.vue index acc03c61..d637abe9 100644 --- a/client/src/components/requests/leaveRequest.vue +++ b/client/src/components/requests/leaveRequest.vue @@ -107,7 +107,6 @@ export default { }, ), undefined, { onSuccess(data) { - console.log(data) ctx.emit("create-event", data) } }) diff --git a/client/src/types/api.ts b/client/src/types/api.ts index 9eae1bab..2d76f0e1 100644 --- a/client/src/types/api.ts +++ b/client/src/types/api.ts @@ -262,6 +262,7 @@ export module Api { meeting? :any event?: any holidays?: any + users?:any date: any len?: number } diff --git a/client/src/utils/helpers.ts b/client/src/utils/helpers.ts index 0bdbd5ba..d6519f48 100644 --- a/client/src/utils/helpers.ts +++ b/client/src/utils/helpers.ts @@ -95,7 +95,7 @@ export function normalizeHoliday(h: Api.Holiday) { const dates = handelDates(h.holiday_date, h.holiday_date) return { - title: `PublicVacation`, + title: `Public Holiday`, color: 'primary', start: dates.start, end: dates.end, @@ -104,6 +104,19 @@ export function normalizeHoliday(h: Api.Holiday) { allDay: true } } +export function normalizedBirthday(u: Api.User) { + const dates = handelDates(u.birthday, u.birthday) + + return { + title: `Birthday`, + color: 'primary', + start: dates.start, + end: dates.end, + backgroundColor: 'gray', + id: u.id.toString(), + allDay: true + } +} export function normalizeMeeting(m: Api.Meetings): any { From c94fc451f112c4cf174499a067c61ed1fdce63b0 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 28 Jan 2024 12:55:13 +0200 Subject: [PATCH 23/31] fixing state user error --- client/src/components/cards/vacationCard.vue | 42 +++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/client/src/components/cards/vacationCard.vue b/client/src/components/cards/vacationCard.vue index 920751d6..ecb2afcf 100644 --- a/client/src/components/cards/vacationCard.vue +++ b/client/src/components/cards/vacationCard.vue @@ -163,33 +163,37 @@ export default { }, ]) const couldUpdate = computed(() => { - if (props.vacation.status == 'pending') { - if (props.vacation.isUpdated && state.user.value.value.id == props.vacation.applying_user) { - return true; + if (state.user.value) { + + if (props.vacation.status == 'pending') { + if (props.vacation.isUpdated && state.user.value.value.id == props.vacation.applying_user) { + return true; + } + if (!props.vacation.isUpdated && state.user.value.value.id == props.vacation.applying_user.id) { + return true; + } + return false } - if (!props.vacation.isUpdated && state.user.value.value.id == props.vacation.applying_user.id) { - return true; - } - return false } return false }); const couldApprove = computed(() => { - if (state.user.value.value.user_type === 'Admin' - || state.user.value.value.user_type === 'Supervisor' - ) { - if (props.vacation.user.id == state.user.value.value.id) { - return true; - + if (state.user.value) { + if (state.user.value.value.user_type === 'Admin' + || state.user.value.value.user_type === 'Supervisor' + ) { + if (props.vacation.user.id == state.user.value.value.id) { + return true; + + } + if (props.vacation.user.reporting_to.includes(state.user.value.value.id) + && props.vacation.user.location.name === state.user.value.value.location.name) { + return true; + } + return false } - if (props.vacation.user.reporting_to.includes(state.user.value.value.id) - && props.vacation.user.location.name === state.user.value.value.location.name) { - return true; - } - return false } - return false }); From c0eb4aba0c0c3e5c4457ff870ad2ceb2b37f936e Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 28 Jan 2024 14:00:33 +0200 Subject: [PATCH 24/31] Remove loading --- client/src/components/calender.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index d155fc4d..5a47f862 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -18,10 +18,7 @@
-
- -
-
- +
{{ user.state.value?.full_name }} @@ -15,7 +15,7 @@
- +
@@ -27,11 +27,11 @@ import { computed, defineComponent, ref } from 'vue' import vacationBalance from '@/components/vacationBalance.vue' import personalInformation from '@/components/personalInformation.vue' import { $api } from '@/clients' -import { onMounted } from 'vue' -import type { Api } from '@/types' import { useRoute } from 'vue-router'; import { useAsyncState } from '@vueuse/core'; import profileImage from "@/components/profileImage.vue"; +import { useState } from '@/store' + export default defineComponent({ components: { vacationBalance, @@ -41,6 +41,7 @@ export default defineComponent({ setup() { const $route = useRoute(); + const state = useState() const user = useAsyncState($route.query.id ? $api.users.getuser(Number($route.query.id)) : $api.myprofile.getUser(), [], { onSuccess(data) { balance.execute(undefined, data.id) @@ -55,10 +56,29 @@ export default defineComponent({ { immediate: false } ) + const showBalance = computed(() => { + if (state.user.value) { + if (user.state.value.id === state.user.value.value.id) { + return true; + } + else if (state.user.value.value.user_type === 'Admin') { + if (user.state.value.reporting_to) { + if (user.state.value.reporting_to.includes(state.user.value.value.id) + && user.state.value.location.name === state.user.value.value.location.name) { + return true; + } + } + return false + } + } + return false + }); return { user, + state, balance, + showBalance, vacationBalance, personalInformation, profileImage, From 1f1fa8325e7b5b2121ea6ad97129de21037dba67 Mon Sep 17 00:00:00 2001 From: Mahmoud Emad Date: Sun, 28 Jan 2024 15:07:02 +0200 Subject: [PATCH 26/31] WIP: Added the expired field, initialized a new refrance from the date object to bind it on changing the month from the calendar. --- client/.env | 2 +- client/src/components/CshrToolbar.vue | 14 ++------ client/src/components/calender.vue | 13 +++++--- client/src/components/cards/holidayCard.vue | 36 ++++++++++++++------- client/src/components/profileImage.vue | 31 +++++++++++++----- client/src/views/ProfileView.vue | 14 +++++--- pnpm-lock.yaml | 5 +++ 7 files changed, 75 insertions(+), 40 deletions(-) create mode 100644 pnpm-lock.yaml diff --git a/client/.env b/client/.env index 7d7b7b0a..c41e9942 100644 --- a/client/.env +++ b/client/.env @@ -1,5 +1,5 @@ # Client Related -VITE_TITLE="CSHR" +VITE_TITLE="Codescalers HR management system" VITE_FAVICON="https://placehold.co/32/steelblue/white?text=CS" VITE_LOGO="https://placehold.co/128/steelblue/white?text=CS" diff --git a/client/src/components/CshrToolbar.vue b/client/src/components/CshrToolbar.vue index de981177..cf32cdaa 100644 --- a/client/src/components/CshrToolbar.vue +++ b/client/src/components/CshrToolbar.vue @@ -45,16 +45,7 @@ @@ -79,10 +70,11 @@ import { useApi } from '@/hooks' import { getStatusColor } from '@/utils' import type { Api } from '@/types' import NotificationDetailsDialog from './NotificationDetailsDialog.vue' +import profileImage from './profileImage.vue' export default { name: 'CshrToolbar', - components: { NotificationDetailsDialog }, + components: { NotificationDetailsDialog, profileImage }, setup() { const $api = useApi() const user = useAsyncState(() => $api.myprofile.getUser(), null) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 5a47f862..4ccf979a 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -77,10 +77,10 @@ import vacationCard from '@/components/cards/vacationCard.vue' import holidayCard from '@/components/cards/holidayCard.vue' import birthdayCard from '@/components/cards/birthdayCard.vue' -import { ref, computed } from 'vue' +import { ref, computed, reactive } from 'vue' import type { Api } from '@/types' import { useApi } from '@/hooks' -import type { EventClickArg, CalendarApi, DayCellMountArg } from '@fullcalendar/core/index.js' +import type { EventClickArg, CalendarApi, DayCellMountArg, CalendarOptions } from '@fullcalendar/core/index.js' import { useAsyncState } from '@vueuse/core' import { normalizeEvent, normalizeVacation, normalizeMeeting, normalizeHoliday, normalizedBirthday } from '@/utils' @@ -100,6 +100,7 @@ export default { setup() { const $api = useApi() const meeting = ref() + const currentDate = ref(new Date()) const isViewRequest = ref(false) const isEvent = ref(false) const isMeeting = ref(false) @@ -239,7 +240,7 @@ export default { } } - const options = { + const options = reactive({ plugins, dayMaxEvents: true, initialView: 'dayGridMonth', @@ -252,8 +253,9 @@ export default { weekends: true, select: onSelect, eventClick: onClick, - editable: false - } + editable: false, + datesSet: (arg: any) => (currentDate.value = arg.view.currentStart), + }) function closeDialog(id: string | number) { isViewRequest.value, isEvent.value, isMeeting.value, (isLeave.value = false) @@ -340,6 +342,7 @@ export default { birthday, selected, homes, + currentDate, updateVacation, dayCellDidMount, closeDialog, diff --git a/client/src/components/cards/holidayCard.vue b/client/src/components/cards/holidayCard.vue index d0264091..8c112e27 100644 --- a/client/src/components/cards/holidayCard.vue +++ b/client/src/components/cards/holidayCard.vue @@ -3,12 +3,16 @@
mdi-close
- -

{{ holiday.location.country }}

+
+ expired +
+ +

{{ holiday.location.country }}

+
-

+

{{ holiday.holiday_date }} is a public holiday in {{ holiday.location.country }}, We hope you and your family have a peaceful and enjoyable holiday. Please be aware that our office in {{ holiday.location.country }}, will be closed on @@ -20,8 +24,6 @@ + + \ No newline at end of file diff --git a/client/src/components/profileImage.vue b/client/src/components/profileImage.vue index dcb0c983..3b7db86f 100644 --- a/client/src/components/profileImage.vue +++ b/client/src/components/profileImage.vue @@ -1,13 +1,28 @@ @@ -17,7 +32,7 @@ import { computed } from 'vue'; export default { name: 'profileImage', - props: ["user"], + props: ["user", "withLink"], setup(props) { const imageSrc = window.env.SERVER_DOMAIN_NAME_API.replace("api", "") diff --git a/client/src/views/ProfileView.vue b/client/src/views/ProfileView.vue index d860f10d..66aa826f 100644 --- a/client/src/views/ProfileView.vue +++ b/client/src/views/ProfileView.vue @@ -3,12 +3,18 @@

+<<<<<<< Updated upstream +======= +
+ +
+>>>>>>> Stashed changes
-
+

{{ user.state.value?.full_name }} -

- Working for {{ user.state.value?.location?.country }} office +
+ Working for {{ user.state.value?.location?.country }} office
@@ -23,7 +29,7 @@ \ No newline at end of file + diff --git a/client/src/components/cards/eventCard.vue b/client/src/components/cards/eventCard.vue index 1872819f..2ddcf094 100644 --- a/client/src/components/cards/eventCard.vue +++ b/client/src/components/cards/eventCard.vue @@ -6,75 +6,71 @@ {{ event.name }} - + Description - {{ event.description ? event.description : "--" }} + {{ event.description ? event.description : '--' }} - - - - {{ header }} + + + + {{ header }} + + - - - - + + + {{ fromDate }} + - - {{ fromDate }} - + + {{ toDate }} + - - {{ toDate }} - + + {{ fromTime }} + - - {{ fromTime }} - - - - {{ toTime }} - - + + {{ toTime }} + + - + diff --git a/client/src/components/cards/holidayCard.vue b/client/src/components/cards/holidayCard.vue index 8c112e27..89c3fe93 100644 --- a/client/src/components/cards/holidayCard.vue +++ b/client/src/components/cards/holidayCard.vue @@ -3,39 +3,36 @@
mdi-close
-
- expired -
+
expired

{{ holiday.location.country }}


- +

- {{ holiday.holiday_date }} is a public holiday in {{ holiday.location.country }}, We hope you and - your family have a peaceful and enjoyable holiday. Please be aware that our office in {{ - holiday.location.country }}, will be closed on - this date. Thank you! + {{ holiday.holiday_date }} is a public holiday in + {{ holiday.location.country }}, We hope you and your family have a peaceful and enjoyable holiday. Please be aware that + our office in {{ holiday.location.country }}, will be closed on this date. Thank you!

-
\ No newline at end of file + diff --git a/client/src/components/cards/meetingCard.vue b/client/src/components/cards/meetingCard.vue index 500de05d..56119b30 100644 --- a/client/src/components/cards/meetingCard.vue +++ b/client/src/components/cards/meetingCard.vue @@ -1,4 +1,3 @@ - From 5212de5d2cfda1427a0d2e4ab34a353f0961c005 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 28 Jan 2024 15:40:29 +0200 Subject: [PATCH 29/31] Adding v-alert on loading --- client/src/components/calender.vue | 79 +++++++++--------------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index ab2b3678..264d86ae 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -18,84 +18,52 @@
- +
+ +
+
- + - + @create-meeting="createMeeting(dates?.startStr, $event)" @create-event="createEvent(dates?.startStr, $event)" /> - + - + - + - + - + - + @update-vacation="updateVacation(vacation.id, $event)" @delete-vacation="deleteVacation(vacation.id)" /> @@ -227,11 +195,12 @@ export default { watch( () => currentDate.value, - async (newValue) => { - console.log(newValue) - homes.execute() - } - ) + async (newValue, oldValue) => { + if (newValue.getMonth() + 1 !== oldValue.getMonth() + 1 || newValue.getFullYear() !== oldValue.getFullYear()) { + homes.execute(); + } + }, + ); const onSelect = async (arg: any) => { calendar.value = arg.view.calendar From dd34c62dd323da25a5ac50a9a94c041659e34170 Mon Sep 17 00:00:00 2001 From: Mahmoud Emad Date: Sun, 28 Jan 2024 15:54:12 +0200 Subject: [PATCH 30/31] Enhance the birthday card. --- client/src/components/cards/birthdayCard.vue | 42 ++++++++++++-------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/client/src/components/cards/birthdayCard.vue b/client/src/components/cards/birthdayCard.vue index 4ed10035..989556c5 100644 --- a/client/src/components/cards/birthdayCard.vue +++ b/client/src/components/cards/birthdayCard.vue @@ -1,15 +1,26 @@ From ad8adee7d6a147d2c595abbbc2189379f6da3adf Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 28 Jan 2024 16:01:32 +0200 Subject: [PATCH 31/31] Change warning alert to info alert --- client/src/components/calender.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index 264d86ae..c507dda9 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -19,9 +19,9 @@
- +
-