diff --git a/index.html b/index.html index 7581b75..272a51b 100644 --- a/index.html +++ b/index.html @@ -5,16 +5,6 @@ HRMS - Landing Page -
diff --git a/package.json b/package.json index db2b07f..0a9c299 100644 --- a/package.json +++ b/package.json @@ -11,26 +11,31 @@ "format": "prettier ./src --write" }, "dependencies": { - "@arcgis/core": "^4.28.10", + "@fullcalendar/core": "^6.1.8", + "@fullcalendar/daygrid": "^6.1.8", + "@fullcalendar/interaction": "^6.1.8", + "@fullcalendar/list": "^6.1.8", + "@fullcalendar/timegrid": "^6.1.8", + "@fullcalendar/vue3": "^6.1.8", + "@googlemaps/js-api-loader": "^1.16.2", "@quasar/extras": "^1.15.8", "@vuepic/vue-datepicker": "^5.2.1", "keycloak-js": "^22.0.2", "moment": "^2.29.4", "pinia": "^2.1.4", - "quasar": "^2.17.5", + "quasar": "^2.11.1", "register-service-worker": "^1.7.2", - "sass": "^1.83.0", "simple-vue-camera": "^1.1.3", "vite-plugin-pwa": "^0.16.7", "vue": "^3.4.15", - "vue-router": "^4.5.0" + "vue-router": "^4.1.6", + "vue3-google-map": "^0.18.0" }, "devDependencies": { "@quasar/vite-plugin": "^1.3.0", "@rushstack/eslint-patch": "^1.1.4", "@types/jsdom": "^20.0.1", "@types/node": "^18.18.10", - "@types/vue-router": "^2.0.0", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.0", "@vue/eslint-config-prettier": "^7.0.0", @@ -44,10 +49,13 @@ "jsdom": "^20.0.3", "npm-run-all": "^4.1.5", "prettier": "^2.7.1", + "sass": "^1.83.0", + "sass-loader": "^16.0.4", "start-server-and-test": "^1.15.2", "typescript": "~4.7.4", "vite": "^4.0.0", "vitest": "^0.25.6", + "vue-loader": "^17.4.2", "vue-tsc": "^1.0.12" } } diff --git a/public/favicon.ico b/public/favicon.ico index 4d31d3e..4420a4d 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/assets/3135715.png b/src/assets/3135715.png new file mode 100644 index 0000000..1c927a4 Binary files /dev/null and b/src/assets/3135715.png differ diff --git a/src/assets/bg.png b/src/assets/bg.png new file mode 100644 index 0000000..c07ee24 Binary files /dev/null and b/src/assets/bg.png differ diff --git a/src/assets/line2.png b/src/assets/line2.png new file mode 100644 index 0000000..70d00e4 Binary files /dev/null and b/src/assets/line2.png differ diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..3b1adc0 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/screen1.png b/src/assets/screen1.png new file mode 100644 index 0000000..09d7273 Binary files /dev/null and b/src/assets/screen1.png differ diff --git a/src/assets/screen2.png b/src/assets/screen2.png new file mode 100644 index 0000000..41e9ae4 Binary files /dev/null and b/src/assets/screen2.png differ diff --git a/src/assets/screen3.png b/src/assets/screen3.png new file mode 100644 index 0000000..afdac59 Binary files /dev/null and b/src/assets/screen3.png differ diff --git a/src/assets/screen4.png b/src/assets/screen4.png new file mode 100644 index 0000000..d897cd1 Binary files /dev/null and b/src/assets/screen4.png differ diff --git a/src/components/CustomDialog.vue b/src/components/CustomDialog.vue new file mode 100644 index 0000000..7db4641 --- /dev/null +++ b/src/components/CustomDialog.vue @@ -0,0 +1,90 @@ + + + diff --git a/src/plugins/cookie.ts b/src/plugins/cookie.ts new file mode 100644 index 0000000..07471a9 --- /dev/null +++ b/src/plugins/cookie.ts @@ -0,0 +1,27 @@ +// authen with keycloak client +function setCookie(name: string, value: string, days: number) { + let expires = ""; + if (days) { + const date = new Date(); + date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); + expires = "; expires=" + date.toUTCString(); + } + document.cookie = name + "=" + (value || "") + expires + "; path=/"; +} + +function getCookie(name: string) { + const nameEQ = name + "="; + const ca = document.cookie.split(";"); + for (let i = 0; i < ca.length; i++) { + let c = ca[i]; + while (c.charAt(0) == " ") c = c.substring(1, c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); + } + return null; +} + +function deleteCookie(name: string) { + document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`; +} + +export { setCookie, getCookie, deleteCookie }; diff --git a/src/plugins/keycloak.ts b/src/plugins/keycloak.ts deleted file mode 100644 index d882c3e..0000000 --- a/src/plugins/keycloak.ts +++ /dev/null @@ -1,70 +0,0 @@ -// authen with keycloak client -import Keycloak from "keycloak-js"; - -// const ACCESS_TOKEN = 'BMAHRIS_KEYCLOAK_IDENTITY' -// const REFRESH_TOKEN = 'BMAHRIS_KEYCLOAK_REFRESH' -// const keycloakConfig = { -// url: import.meta.env.VITE_URL_KEYCLOAK, -// realm: import.meta.env.VITE_REALM_KEYCLOAK, -// clientId: import.meta.env.VITE_CLIENTID_KEYCLOAK, -// clientSecret: import.meta.env.VITE_CLIENTSECRET_KEYCLOAK, -// } - -// const keycloak = new Keycloak(keycloakConfig) - -// async function kcAuthen(access_token: string, refresh_token: string) { -// await setCookie(ACCESS_TOKEN, access_token, 1) -// await setCookie(REFRESH_TOKEN, refresh_token, 1) -// window.location.href = '/' -// } - -// async function kcLogout() { -// await deleteCookie(ACCESS_TOKEN) -// await deleteCookie(REFRESH_TOKEN) -// if (keycloak.authenticated !== undefined) { -// keycloak.logout() -// } -// window.location.href = '/login' -// } - -// async function getToken() { -// return { -// token: getCookie(ACCESS_TOKEN), -// refresh_token: getCookie(REFRESH_TOKEN), -// } -// } - -// function setCookie(name: string, value: any, days: number) { -// let expires = '' -// if (days) { -// const date = new Date() -// date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000) -// expires = '; expires=' + date.toUTCString() -// } -// document.cookie = name + '=' + (value || '') + expires + '; path=/' -// } - -// function getCookie(name: string) { -// const nameEQ = name + '=' -// const ca = document.cookie.split(';') -// for (let i = 0; i < ca.length; i++) { -// let c = ca[i] -// while (c.charAt(0) == ' ') c = c.substring(1, c.length) -// if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length) -// } -// return null -// } - -// function deleteCookie(name: string) { -// document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;` -// } - -// export default keycloak -// export { -// keycloakConfig, -// getToken, -// kcAuthen, -// kcLogout, -// ACCESS_TOKEN, -// REFRESH_TOKEN, -// } diff --git a/src/router/index.ts b/src/router/index.ts index 28c6284..31d09f2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,6 @@ import { createRouter, createWebHistory } from "vue-router"; const homeView = () => import("@/views/home.vue"); +const ssoPage = () => import("@/views/sso.vue"); const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -23,6 +24,14 @@ const router = createRouter({ }, ], }, + { + path: "/sso", + name: "sso-page", + component: ssoPage, + meta: { + Auth: false, + }, + }, ], }); diff --git a/src/views/home.vue b/src/views/home.vue index 750cbb1..b758a67 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -1,16 +1,173 @@ - + diff --git a/src/views/sso.vue b/src/views/sso.vue new file mode 100644 index 0000000..00d99df --- /dev/null +++ b/src/views/sso.vue @@ -0,0 +1,298 @@ + + + + + + diff --git a/vite.config.js b/vite.config.js index 292aa7d..be0d872 100644 --- a/vite.config.js +++ b/vite.config.js @@ -28,24 +28,6 @@ export default defineConfig({ name: 'BMA-Checkin', short_name: 'EHR Checkin', theme_color: '#ffffff', - icons: [ - { - src: 'icons/android-chrome-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: 'icons/android-chrome-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - { - src: 'icons/android-chrome-512x512.png', - sizes: '512x512', - type: 'image/png', - purpose: ['any', 'maskable'], - }, - ], }, }), ],