Merge branch 'develop' into setthawut

# Conflicts:
#	src/modules/05_command/views/lists.vue
This commit is contained in:
STW_TTTY\stwtt 2024-09-20 16:58:47 +07:00
commit 4d2536588c
6 changed files with 27 additions and 25 deletions

View file

@ -82,13 +82,17 @@ async function fetchDocumentTemplate(dataTemple: DataTemplateDetail) {
};
await axios
.post(config.API.reportTemplate + `/${typeFile.value}`, body, {
headers: {
accept: "application/pdf",
"content-Type": "application/json",
},
responseType: "blob",
})
.post(
config.API.reportTemplate + `/${typeFile.value}?folder=command`,
body,
{
headers: {
accept: "application/pdf",
"content-Type": "application/json",
},
responseType: "blob",
}
)
.then(async (res) => {
isLoadPDF.value = false;
const blob = new Blob([res.data]);
@ -123,7 +127,7 @@ async function uploadTemplate() {
await axios
.post(
config.API.reportTemplate +
`/${typeFile.value}/upload?report_name=${reportName}`,
`/${typeFile.value}/upload?report_name=${reportName}&folder=command`,
documentFile.value,
{
headers: {
@ -163,7 +167,7 @@ async function downloadTemplate() {
: dataTemplateDetail.value.fileAttachment);
await axios
.post(
config.API.reportTemplate + `/${typeFile.value}/download`,
config.API.reportTemplate + `/${typeFile.value}/download?folder=command`,
{
template: check,
},

View file

@ -31,7 +31,7 @@ const childTemplateDetailRef = ref<InstanceType<typeof TemplateDetail> | null>(
null
); //ref components
const childPageOrderRef = ref<InstanceType<typeof PageOrder> | null>(null); //ref components
// Tabs
const tabs = ref<Tabs[]>([
{
@ -265,11 +265,10 @@ onMounted(async () => {
<q-space />
<div class="col-12 col-md-6 q-py-sm">
<div class="row items-center no-wrap justify-end">
<q-badge
outline
:color="`${isActive ? `primary` : `orange`}`"
:label="`${isActive ? `Active` : `InActive`}`"
/>
<q-label
:class="`${isActive ? `text-primary` : `text-orange`}`"
>{{ `${isActive ? `ใช้งาน` : `ไม่ใช้งาน`}` }}</q-label
>
<label :class="`q-ml-lg toggle-control`">
<input type="checkbox" v-model="isActive" />
<span class="control"></span>

View file

@ -304,11 +304,10 @@ onMounted(() => {
<q-space />
<div class="row items-center no-wrap">
<q-badge
outline
:color="`${isActive ? `primary` : `orange`}`"
:label="`${isActive ? `ใช้` : `ไม่ใช้`}งาน`"
/>
<q-label
:class="`${isActive ? `text-primary` : `text-orange`}`"
>{{ `${isActive ? `ใช้งาน` : `ไม่ใช้งาน`}` }}</q-label
>
<label :class="`q-ml-lg toggle-control`">
<input type="checkbox" v-model="isActive" />
<span class="control"></span>