diff --git a/Readme.md b/Readme.md index 5eb1bb2..79dbcbb 100644 --- a/Readme.md +++ b/Readme.md @@ -7,17 +7,16 @@ [![Twitter Follow](https://img.shields.io/twitter/follow/eventyay.svg?style=social&label=Follow&maxAge=2592000?style=flat-square)](https://twitter.com/eventyay) ## Communication - -Please join our [Mailing list](https://groups.google.com/forum/#!forum/open-event) or [chat channel](https://gitter.im/fossasia/open-event-frontend) to get in touch with the developers. +Please join our [mailing list](https://groups.google.com/forum/#!forum/open-event) or [chat channel](https://gitter.im/fossasia/open-event-frontend) to get in touch with the developers. ## Installation - Easily deployed on a variety of platforms. Detailed platform specific instructions have been provided below. + ### Local -Clone or Fork the codebase and following instructions [below](https://github.com/fossasia/open-event-checkin/tree/development/.github/workflows) +Clone or Fork the codebase and following instructions [below](#running--development). ### Github Pages (using Github Actions) -Refer to our [workflow](https://github.com/fossasia/open-event-checkin/tree/development/.github/workflows) for deployment +Refer to the [workflow](https://github.com/fossasia/open-event-checkin/tree/development/.github/workflows) for deployment. ## Running / Development @@ -69,13 +68,11 @@ npm build **Master branch** -Deployed in a production environment at [https://checkin.eventyay.com](https://checkin-eventyay.com) -It consumes the API exposed by master branch deployment of open event server, hosted at [https://api.eventyay.com](https://api.eventyay.com) +Deployed in a production environment at [checkin.eventyay.com](https://checkin.eventyay.com) it consumes the API exposed by master branch deployment of open event server, hosted at [api.eventyay.com](https://api.eventyay.com). #### Development branch -Only deployed locally with `npm run dev` or Netlify version when you make a pull request -It consumes the API exposed by development branch of open event server, hosted at [https://test-api.eventyay.com](https://test-api.eventyay.com) +Only deployed locally with `npm run dev` or Netlify when you make a pull request it consumes the API exposed by development branch of open event server, hosted at [test-api.eventyay.com](https://test-api.eventyay.com). ## Further Reading / Useful Links @@ -98,9 +95,9 @@ It consumes the API exposed by development branch of open event server, hosted a ### Commits -- Write clear meaningful git commit messages (Do read [https://chris.beams.io/posts/git-commit/](https://chris.beams.io/posts/git-commit/)) -- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. (More info at [https://github.com/blog/1506-closing-issues-via-pull-requests](https://github.com/blog/1506-closing-issues-via-pull-requests) ) -- When you make very minor changes to a PR of yours (like for example fixing a failing Travis build or some small style corrections or minor changes requested by reviewers) make sure you squash your commits afterward so that you don't have an absurd number of commits for a very small fix. (Learn how to squash at [https://davidwalsh.name/squash-commits-git](https://davidwalsh.name/squash-commits-git) ) +- Write clear meaningful git commit messages (Do read [chris.beams.io/posts/git-commit/](https://chris.beams.io/posts/git-commit/)) +- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. (More info at [github.com/blog/1506-closing-issues-via-pull-requests](https://github.com/blog/1506-closing-issues-via-pull-requests) ) +- When you make very minor changes to a PR of yours (like for example fixing a failing Travis build or some small style corrections or minor changes requested by reviewers) make sure you squash your commits afterward so that you don't have an absurd number of commits for a very small fix. (Learn how to squash at [davidwalsh.name/squash-commits-git](https://davidwalsh.name/squash-commits-git) ) - When you're submitting a PR for a UI-related issue, it would be really awesome if you add a screenshot of your change or a link to a deployment where it can be tested out along with your PR. It makes it very easy for the reviewers and you'll also get reviews quicker. ### Feature Requests and Bug Reports @@ -116,4 +113,4 @@ When you file a feature request or when you are submitting a bug report to the [ This project is currently licensed under the [Apache License version 2.0](LICENSE). -To obtain the software under a different license, Please contact **[FOSSASIA](https://blog.fossasia.org/contact/)**. +To obtain the software under a different license, Please contact [FOSSASIA](https://blog.fossasia.org/contact/). \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3332041..fb1c401 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "mande": "^2.0.6", "pinia": "^2.1.3", "vue": "^3.3.4", - "vue-qrcode-reader": "3.1.0-vue3-compatibility.2", + "vue-qrcode-reader": "^5.3.4", "vue-router": "^4.2.2" }, "devDependencies": { @@ -713,6 +713,24 @@ "integrity": "sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw==", "dev": true }, + "node_modules/@sec-ant/barcode-detector": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@sec-ant/barcode-detector/-/barcode-detector-1.3.1.tgz", + "integrity": "sha512-JeQ9OnDNN1hYM7pxLpD0jhI7isnSkBTC+oxqqBfCtCzCDyr+807ouvjLbIUrHdZPp+7AaJhnYBdp09R++Z/POA==", + "dependencies": { + "@sec-ant/zxing-wasm": "^2.1.3", + "@types/dom-webcodecs": "^0.1.8" + } + }, + "node_modules/@sec-ant/zxing-wasm": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@sec-ant/zxing-wasm/-/zxing-wasm-2.1.4.tgz", + "integrity": "sha512-7KmKMvN5nT4AL5hrXzTouO6MBSK4mZladSaiYT7gDqEMRiHcEKBfrgV3f0KwWeUSexzouQMJrczYvobXtXl3Ig==", + "dependencies": { + "@types/emscripten": "^1.39.7", + "zustand": "^4.4.1" + } + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -770,6 +788,16 @@ "@types/chai": "*" } }, + "node_modules/@types/dom-webcodecs": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@types/dom-webcodecs/-/dom-webcodecs-0.1.8.tgz", + "integrity": "sha512-KThTPaGQJLITk8Q0XkEkz+GqFdoWDyQfbyeJmfEUagB15TZQdNx5AqP2b7GP6vkVM6X/6T1Z8EHxA8RgHfY9BA==" + }, + "node_modules/@types/emscripten": { + "version": "1.39.7", + "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.39.7.tgz", + "integrity": "sha512-tLqYV94vuqDrXh515F/FOGtBcRMTPGvVV1LzLbtYDcQmmhtpf/gLYf+hikBbQk8MzOHNz37wpFfJbYAuSn8HqA==" + }, "node_modules/@types/estree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", @@ -914,19 +942,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vue/compat": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@vue/compat/-/compat-3.3.4.tgz", - "integrity": "sha512-VwAsPqUqRJVxeLQPUC03Sa5d+T8UG2Qv4VItq74KmNvtQlRXICpa/sqq12BcyBB4Tz1U5paOEZxWCUoXkrZ9QQ==", - "dependencies": { - "@babel/parser": "^7.21.3", - "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" - }, - "peerDependencies": { - "vue": "3.3.4" - } - }, "node_modules/@vue/compiler-core": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz", @@ -1066,26 +1081,6 @@ "vue": "^3.0.1" } }, - "node_modules/@zxing/library": { - "version": "0.18.6", - "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.18.6.tgz", - "integrity": "sha512-bulZ9JHoLFd9W36pi+7e7DnEYNJhljYjZ1UTsKPOoLMU3qtC+REHITeCRNx40zTRJZx18W5TBRXt5pq2Uopjsw==", - "dependencies": { - "ts-custom-error": "^3.0.0" - }, - "engines": { - "node": ">= 10.4.0" - }, - "optionalDependencies": { - "@zxing/text-encoding": "~0.9.0" - } - }, - "node_modules/@zxing/text-encoding": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", - "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", - "optional": true - }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -1435,15 +1430,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/barcode-detector": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/barcode-detector/-/barcode-detector-1.0.3.tgz", - "integrity": "sha512-pQY+sPhY2aZ9hdLJnniY5zcsaDXSpymTWtVbZHbmJPVCRt7HnYYfXLLHQ4rEYOvahEML3oJ71VjwBc80hS0RvQ==", - "dependencies": { - "@zxing/library": "^0.18.4", - "jsqr": "^1.3.1" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -1624,11 +1610,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/callforth": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/callforth/-/callforth-0.3.1.tgz", - "integrity": "sha512-Q2zPfqnwoKsb1DTVCr4lmhe49wKNBsMmNlbudjleu3/co+Nw1pOqFHYJHrW3VZ253ou9AAr+xauQR0C55NPdzA==" - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1962,16 +1943,6 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "node_modules/core-js": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.0.tgz", - "integrity": "sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -3524,6 +3495,12 @@ "node": ">= 0.8" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3679,11 +3656,6 @@ "verror": "1.10.0" } }, - "node_modules/jsqr": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", - "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" - }, "node_modules/lazy-ass": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", @@ -3865,6 +3837,18 @@ "node": ">=8" } }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -4869,6 +4853,18 @@ } ] }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -5023,18 +5019,6 @@ "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", "dev": true }, - "node_modules/rtcpeerconnection-shim": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", - "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", - "dependencies": { - "sdp": "^2.6.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=3.10.0" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5106,9 +5090,9 @@ } }, "node_modules/sdp": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", - "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", + "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" }, "node_modules/semver": { "version": "7.5.2", @@ -5681,14 +5665,6 @@ "node": ">=14" } }, - "node_modules/ts-custom-error": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", - "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -5839,6 +5815,14 @@ "requires-port": "^1.0.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -6054,16 +6038,15 @@ } }, "node_modules/vue-qrcode-reader": { - "version": "3.1.0-vue3-compatibility.2", - "resolved": "https://registry.npmjs.org/vue-qrcode-reader/-/vue-qrcode-reader-3.1.0-vue3-compatibility.2.tgz", - "integrity": "sha512-tGu2zmPGSi9SJR08Yl2favix0vs5SgXudGXdwW2KxcvlU9jfsX9FAYkuaifyiq3CgxKijwRxA/YJpS0Yl9PMfw==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/vue-qrcode-reader/-/vue-qrcode-reader-5.3.4.tgz", + "integrity": "sha512-pWF4Vhj/J2tVYP8VIQKue6Pl9K1ccA9iadG+u6LGnIYjwxVDZRDoXQYpKRX8IfYKFgSkRMQhLlj0xwCLiw7YdQ==", "dependencies": { - "@vue/compat": "^3.1.0", - "barcode-detector": "^1.0.0", - "callforth": "^0.3.1", - "core-js": "^3.6.5", - "vue": "^3.1.0", - "webrtc-adapter": "7.7.0" + "@sec-ant/barcode-detector": "^1.2.2", + "webrtc-adapter": "^8.2.3" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/vue-router": { @@ -6121,12 +6104,11 @@ } }, "node_modules/webrtc-adapter": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.0.tgz", - "integrity": "sha512-7Bp9OBnx642oJRkom1tNAbeJjUadAq2rh5xLL9YXPw5hVyt2h4hHr5bcoPYDs1stp/mZHSPSQA34YISdnr0DBQ==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz", + "integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==", "dependencies": { - "rtcpeerconnection-shim": "^1.2.15", - "sdp": "^2.12.0" + "sdp": "^3.2.0" }, "engines": { "node": ">=6.0.0", @@ -6302,6 +6284,33 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zustand": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.4.1.tgz", + "integrity": "sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==", + "dependencies": { + "use-sync-external-store": "1.2.0" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } } } } diff --git a/package.json b/package.json index 9166560..063ab33 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "vite", + "build:staging": "vite build --mode staging", "build": "vite build", "preview": "vite preview --port 8080 --host", "test:unit": "vitest", @@ -19,7 +20,7 @@ "mande": "^2.0.6", "pinia": "^2.1.3", "vue": "^3.3.4", - "vue-qrcode-reader": "3.1.0-vue3-compatibility.2", + "vue-qrcode-reader": "^5.3.4", "vue-router": "^4.2.2" }, "devDependencies": { diff --git a/public/test-badge.pdf b/public/test-badge.pdf new file mode 100644 index 0000000..51967bd Binary files /dev/null and b/public/test-badge.pdf differ diff --git a/src/components/QRScanner/ScannerCamera.vue b/src/components/CheckIn/CheckInCamera.vue similarity index 79% rename from src/components/QRScanner/ScannerCamera.vue rename to src/components/CheckIn/CheckInCamera.vue index e88de4b..a0020fb 100644 --- a/src/components/QRScanner/ScannerCamera.vue +++ b/src/components/CheckIn/CheckInCamera.vue @@ -15,7 +15,10 @@ const scannerType = route.params.scannerType const microlocationId = route.params.stationId onBeforeMount(async () => { - await sessionsStore.getCurrentSession(microlocationId) + if (scannerType !== 'daily') { + await sessionsStore.getCurrentSession(microlocationId) + } + processCheckInStore.$reset() loadingStore.contentLoaded() }) @@ -27,10 +30,10 @@ onBeforeMount(async () => {

- {{ processCheckInStore.response.message }}

diff --git a/src/components/QRScanner/ScannedStats.vue b/src/components/CheckIn/CheckInStats.vue similarity index 95% rename from src/components/QRScanner/ScannedStats.vue rename to src/components/CheckIn/CheckInStats.vue index d0c05b6..b1a075c 100644 --- a/src/components/QRScanner/ScannedStats.vue +++ b/src/components/CheckIn/CheckInStats.vue @@ -11,6 +11,7 @@ const statsStore = useStatsStore() const sessionsStore = useSessionsStore() const route = useRoute() const eventId = route.params.eventId +const scannerType = route.params.scannerType const microlocationId = route.params.stationId const sessionStats = ref([ @@ -52,7 +53,7 @@ onBeforeMount(async () => {

Stats

-
+

Current Session: {{ sessionsStore.currentSessionName }} @@ -86,5 +87,6 @@ onBeforeMount(async () => {

+
Work in progress
diff --git a/src/components/Common/QRCamera.vue b/src/components/Common/QRCamera.vue index 5820ddf..ddc1ea6 100644 --- a/src/components/Common/QRCamera.vue +++ b/src/components/Common/QRCamera.vue @@ -1,6 +1,7 @@