From 5be09a78570c32d008dcea286069dcf02deb8d29 Mon Sep 17 00:00:00 2001 From: Francis Pion Date: Thu, 4 Jan 2024 13:27:25 -0500 Subject: [PATCH] Code cleanup. (#14) * Updated Logitar Vue3 UI. * Removed a todo. * Completed Toasts and error handling. * Removed package-lock.json * Removed package-log.json * Returning the saved item. * Using saved return item and exclude selected types. * Added a refresh button. * Fixed toasts. * Fixed sorts and added an action column. * Code clean-up. * Code cleanup. --- frontend/package.json | 2 +- frontend/src/assets/style.css | 125 +++++++++++++++++++ frontend/src/components/RosterItemForm.vue | 2 +- frontend/src/components/RosterSelection.vue | 6 +- frontend/src/components/RosterStatistics.vue | 10 +- frontend/src/main.ts | 2 +- frontend/src/views/RosterView.vue | 4 +- frontend/yarn.lock | 8 +- 8 files changed, 142 insertions(+), 17 deletions(-) create mode 100644 frontend/src/assets/style.css diff --git a/frontend/package.json b/frontend/package.json index f6038eb..68555c0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,7 +22,7 @@ "@fortawesome/vue-fontawesome": "^3.0.5", "@popperjs/core": "^2.11.8", "bootstrap": "^5.3.2", - "logitar-vue3-ui": "^2.0.2", + "logitar-vue3-ui": "^2.0.5", "pinia": "^2.1.7", "vue": "^3.3.11", "vue-router": "^4.2.5" diff --git a/frontend/src/assets/style.css b/frontend/src/assets/style.css new file mode 100644 index 0000000..bc18bf1 --- /dev/null +++ b/frontend/src/assets/style.css @@ -0,0 +1,125 @@ +.badge[data-v-4065aa16] { + display: inline-flex; + align-items: center; + justify-content: center; + vertical-align: middle; + flex-shrink: 0; + font-size: inherit; + font-weight: 400; + line-height: 1; + max-width: 100%; + text-align: center; + overflow: visible; + position: relative; + transition: + color 0.15s ease-in-out, + background-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; +} +button[data-v-19270d92]:disabled { + cursor: not-allowed !important; +} +.toast.toast-primary[data-v-b5177847] { + background-color: #e6f2ffd9; + border-color: #b8daffd9; + color: #004085; +} +.toast.toast-primary.toast-solid[data-v-b5177847] { + background-color: #e6f2ff; +} +.toast.toast-primary .toast-header[data-v-b5177847] { + color: #004085; + background-color: #cce5ffd9; + border-bottom-color: #b8daffd9; +} +.toast.toast-secondary[data-v-b5177847] { + background-color: #eff0f1d9; + border-color: #d6d8dbd9; + color: #383d41; +} +.toast.toast-secondary.toast-solid[data-v-b5177847] { + background-color: #eff0f1; +} +.toast.toast-secondary .toast-header[data-v-b5177847] { + color: #383d41; + background-color: #e2e3e5d9; + border-bottom-color: #d6d8dbd9; +} +.toast.toast-success[data-v-b5177847] { + background-color: #e6f5e9d9; + border-color: #c3e6cbd9; + color: #155724; +} +.toast.toast-success.toast-solid[data-v-b5177847] { + background-color: #e6f5e9; +} +.toast.toast-success .toast-header[data-v-b5177847] { + color: #155724; + background-color: #d4eddad9; + border-bottom-color: #c3e6cbd9; +} +.toast.toast-danger[data-v-b5177847] { + background-color: #fcedeed9; + border-color: #f5c6cbd9; + color: #721c24; +} +.toast.toast-danger.toast-solid[data-v-b5177847] { + background-color: #fcedee; +} +.toast.toast-danger .toast-header[data-v-b5177847] { + color: #721c24; + background-color: #f8d7dad9; + border-bottom-color: #f5c6cbd9; +} +.toast.toast-warning[data-v-b5177847] { + background-color: #fff9e7d9; + border-color: #ffeebad9; + color: #856404; +} +.toast.toast-warning.toast-solid[data-v-b5177847] { + background-color: #fff9e7; +} +.toast.toast-warning .toast-header[data-v-b5177847] { + color: #856404; + background-color: #fff3cdd9; + border-bottom-color: #ffeebad9; +} +.toast.toast-info[data-v-b5177847] { + background-color: #e5f4f7d9; + border-color: #bee5ebd9; + color: #0c5460; +} +.toast.toast-info.toast-solid[data-v-b5177847] { + background-color: #e5f4f7; +} +.toast.toast-info .toast-header[data-v-b5177847] { + color: #0c5460; + background-color: #d1ecf1d9; + border-bottom-color: #bee5ebd9; +} +.toast.toast-light[data-v-b5177847] { + background-color: #ffffffd9; + border-color: #fdfdfed9; + color: #818182; +} +.toast.toast-light.toast-solid[data-v-b5177847] { + background-color: #fff; +} +.toast.toast-light .toast-header[data-v-b5177847] { + color: #818182; + background-color: #fefefed9; + border-bottom-color: #fdfdfed9; +} +.toast.toast-dark[data-v-b5177847] { + background-color: #e3e5e5d9; + border-color: #c6c8cad9; + color: #1b1e21; +} +.toast.toast-dark.toast-solid[data-v-b5177847] { + background-color: #e3e5e5; +} +.toast.toast-dark .toast-header[data-v-b5177847] { + color: #1b1e21; + background-color: #d6d8d9d9; + border-bottom-color: #c6c8cad9; +} diff --git a/frontend/src/components/RosterItemForm.vue b/frontend/src/components/RosterItemForm.vue index f6bac0f..ef351b4 100644 --- a/frontend/src/components/RosterItemForm.vue +++ b/frontend/src/components/RosterItemForm.vue @@ -155,7 +155,7 @@ onMounted(async () => { :disabled="types.length === 0" id="secondary-type" :value="payload.secondaryType || ''" - @input="payload.secondaryType = parsingUtils.parseNumber(($event.target as HTMLSelectElement).value) || 0" + @input="payload.secondaryType = parsingUtils.parseNumber(($event.target as HTMLSelectElement).value) || undefined" >