Merge branch 'develop' into warunee-dev

This commit is contained in:
Warunee Tamkoo 2023-09-14 10:53:19 +07:00
commit d4211c6dd5
3 changed files with 93 additions and 14 deletions

View file

@ -2,7 +2,7 @@
import { ref, watch } from "vue";
import DialogHeader from "@/components/DialogHeader.vue";
const reason = ref<string>("");
const reason = ref<string | undefined>("");
const props = defineProps({
modal: {
type: Boolean,
@ -18,16 +18,21 @@ const props = defineProps({
},
clickClose: {
type: Function,
default: () => { },
default: () => {},
},
savaForm: {
type: Function,
default: () => { },
default: () => {},
},
textReport: {
type: String,
},
});
watch(props, () => {
if (props.modal === true) {
if (props.modal === true && props.textReport == "") {
reason.value = "";
} else {
reason.value = props.textReport;
}
});
@ -51,18 +56,31 @@ const submit = () => {
<div class="row col-12 q-col-gutter-sm">
<div class="col-xs-12">
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
<q-input type="textarea" class="full-width inputgreen cursor-pointer" hide-bottom-space outlined dense
lazy-rules :rules="[(val) => !!val || `กรุณากรอก${label}`]" v-model="reason" :label="`${label}`" />
<q-input
type="textarea"
class="full-width inputgreen cursor-pointer"
hide-bottom-space
outlined
dense
lazy-rules
:rules="[(val) => !!val || `กรุณากรอก${label}`]"
v-model="reason"
:label="`${label}`"
/>
</div>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn dense unelevated label="บันทึก" color="public" @click="submit" class="q-px-md">
<q-btn
dense
unelevated
label="บันทึก"
color="public"
@click="submit"
class="q-px-md"
>
<!-- icon="mdi-content-save-outline" -->
<q-tooltip>นท</q-tooltip>
</q-btn>