Merge branch 'dev/phatt' into develop

This commit is contained in:
puriphatt 2024-04-09 17:58:24 +07:00
commit 3f4d88d5c4
7 changed files with 263 additions and 198 deletions

50
package-lock.json generated
View file

@ -1,15 +1,16 @@
{
"name": "jobs-file",
"name": "jobs-worker-service",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "jobs-file",
"name": "jobs-worker-service",
"version": "0.0.1",
"dependencies": {
"@quasar/extras": "^1.16.9",
"@tato30/vue-pdf": "^1.9.5",
"@vuepic/vue-datepicker": "^8.4.0",
"axios": "^1.6.8",
"keycloak-js": "^24.0.2",
"mime": "^4.0.1",
@ -23,6 +24,7 @@
"vue-router": "^4.3.0"
},
"devDependencies": {
"@iconify/vue": "^4.1.1",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@quasar/app-vite": "2.0.0-beta.2",
"@types/node": "^20.11.30",
@ -562,6 +564,27 @@
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"dev": true
},
"node_modules/@iconify/types": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
"integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",
"dev": true
},
"node_modules/@iconify/vue": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@iconify/vue/-/vue-4.1.1.tgz",
"integrity": "sha512-RL85Bm/DAe8y6rT6pux7D2FJSiUEM/TPfyK7GrbAOfTSwrhvwJW+S5yijdGcmtXouA8MtuH9C7l4hiSE4mLMjg==",
"dev": true,
"dependencies": {
"@iconify/types": "^2.0.0"
},
"funding": {
"url": "https://github.com/sponsors/cyberalien"
},
"peerDependencies": {
"vue": ">=3"
}
},
"node_modules/@intlify/bundle-utils": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-8.0.0.tgz",
@ -1582,6 +1605,20 @@
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.21.tgz",
"integrity": "sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g=="
},
"node_modules/@vuepic/vue-datepicker": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/@vuepic/vue-datepicker/-/vue-datepicker-8.4.0.tgz",
"integrity": "sha512-Twgvqwd5GrQf3JT2DvAQ/Ku0+sM51zsH1OkQKoRwYqJyF+EugItS8I0CveYmcI3Gbu92RZ9C3DMutvkaiuDzAQ==",
"dependencies": {
"date-fns": "^3.6.0"
},
"engines": {
"node": ">=18.12.0"
},
"peerDependencies": {
"vue": ">=3.2.0"
}
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@ -2555,6 +2592,15 @@
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/date-fns": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kossnocorp"
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",

View file

@ -16,6 +16,7 @@
"dependencies": {
"@quasar/extras": "^1.16.9",
"@tato30/vue-pdf": "^1.9.5",
"@vuepic/vue-datepicker": "^8.4.0",
"axios": "^1.6.8",
"keycloak-js": "^24.0.2",
"mime": "^4.0.1",

View file

@ -1,8 +1,11 @@
import { boot } from 'quasar/wrappers';
import VueDatePicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css'
import GlobalDialog from 'components/GlobalDialog.vue';
import GlobalLoading from 'components/GlobalLoading.vue';
export default boot(({ app }) => {
app.component('global-dialog', GlobalDialog);
app.component('global-loading', GlobalLoading);
app.component('VueDatePicker', VueDatePicker);
});

View file

@ -16,7 +16,7 @@ defineProps<{
round
/>
</div>
<div class="row q-mt-sm color-text">{{ label }}</div>
<div class="row q-mt-sm color-text" v-if="label">{{ $t(label) }}</div>
</div>
</template>

View file

@ -4,21 +4,19 @@ import AppBox from 'components/app/AppBox.vue';
defineProps<{
title: string;
addressLocaleTitle: string;
addressEngTitle: string;
addressTitle: string;
addressENTitle: string;
submit?: (...args: unknown[]) => void;
close?: (...args: unknown[]) => void;
}>();
interface Address {
address: string;
province: string;
district: string;
subDistrict: string;
zip: string;
}
const modal = defineModel('modal', { default: false });
const addressL = defineModel<Address>('addressL');
const addressEng = defineModel<Address>('addressEng');
const address = defineModel('address', { default: '' });
const addressEN = defineModel('addressEN', { default: '' });
const provinceId = defineModel('provinceId');
const districtId = defineModel('districtId');
const subDistrictId = defineModel('subDistrictId');
const zipCode = defineModel('zipCode', { default: '' });
const addrOptions = ref({
provinceOps: [
@ -37,10 +35,8 @@ const addrOptions = ref({
</script>
<template>
<q-dialog full-width v-model="modal">
<AppBox
v-if="addressL && addressEng"
style="padding: 0; border-radius: var(--radius-2)"
>
<AppBox style="padding: 0; border-radius: var(--radius-2)">
<q-form greedy @submit.prevent @validation-success="submit">
<!-- header -->
<q-card-section class="form-header">
<div class="row items-center justity-between">
@ -53,11 +49,13 @@ const addrOptions = ref({
<q-btn
round
flat
id="closeDialog"
icon="mdi-close"
padding="xs"
class="close-btn"
:class="{ dark: $q.dark.isActive }"
v-close-popup
@click="close"
/>
</div>
</q-card-section>
@ -91,21 +89,23 @@ const addrOptions = ref({
>
<slot name="midTop"></slot>
<div class="col-12">
{{ addressLocaleTitle }}
{{ addressTitle }}
</div>
<q-input
dense
outlined
id="AddrL"
label="ที่อยู่"
class="col-12"
v-model="addressL.address"
v-model="address"
/>
<q-select
dense
outlined
emit-value
map-options
v-model="addressL.province"
id="selectProvinceL"
v-model="provinceId"
option-value="value"
option-label="label"
label="จังหวัด"
@ -117,7 +117,8 @@ const addrOptions = ref({
outlined
emit-value
map-options
v-model="addressL.district"
id="selectDistrictL"
v-model="districtId"
option-value="value"
option-label="label"
label="อำเภอ"
@ -128,8 +129,9 @@ const addrOptions = ref({
dense
outlined
emit-value
map-options
v-model="addressL.subDistrict"
map-
id="selectSubDistrictL"
v-model="subDistrictId"
option-value="value"
option-label="label"
label="ตำบล"
@ -140,26 +142,29 @@ const addrOptions = ref({
dense
readonly
outlined
id="zipL"
label="รหัสไปรษณีย์"
class="col-3"
v-model="addressL.zip"
v-model="zipCode"
/>
<span class="col-12">
{{ addressEngTitle }}
{{ addressENTitle }}
</span>
<q-input
dense
outlined
id="addressEN"
label="ที่อยู่"
class="col-12"
v-model="addressEng.address"
v-model="addressEN"
/>
<q-select
dense
outlined
emit-value
map-options
v-model="addressEng.province"
id="selectProvinceEN"
v-model="provinceId"
option-value="value"
option-label="label"
label="จังหวัด"
@ -171,7 +176,8 @@ const addrOptions = ref({
outlined
emit-value
map-options
v-model="addressEng.district"
id="selectDistrictEN"
v-model="districtId"
option-value="value"
option-label="label"
label="อำเภอ"
@ -183,7 +189,8 @@ const addrOptions = ref({
outlined
emit-value
map-options
v-model="addressEng.subDistrict"
id="SelectSubDistrictEN"
v-model="subDistrictId"
option-value="value"
option-label="label"
label="ตำบล"
@ -194,9 +201,10 @@ const addrOptions = ref({
dense
readonly
outlined
zip="zipEN"
label="รหัสไปรษณีย์"
class="col-3"
v-model="addressEng.zip"
v-model="zipCode"
/>
<div class="col-12" v-if="$slots.midBottom">
<q-separator size="1px" />
@ -219,12 +227,15 @@ const addrOptions = ref({
<q-btn
dense
unelevated
id="submitBtn"
type="submit"
color="primary"
class="q-px-sm"
:label="$t('save')"
/>
</div>
</q-card-section>
</q-form>
</AppBox>
</q-dialog>
</template>

View file

@ -159,7 +159,7 @@ const status = ref(false);
>
{{ d.label }}
</span>
<span>{{ d.value }}</span>
<span>{{ d.value || '-' }}</span>
</div>
</div>
</AppBox>

View file

@ -47,3 +47,7 @@ $separator-dark-color: var(--border-color);
.q-dialog__backdrop {
background-color: hsla(0 0% 60% / 0.4) !important;
}
.q-field--dense .q-field__label {
font-family: 'Noto Sans Thai', sans-serif;
}