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

@ -75,7 +75,7 @@ jobs:
-Success✅✅✅ -Success✅✅✅
Image: ${{env.IMAGE_NAME}} Image: ${{env.IMAGE_NAME}}
Version: ${{ steps.gen_ver.outputs.IMAGE_VER }} Version: ${{ steps.gen_ver.outputs.IMAGE_VER }}
By: ${{secrets.DOCKER_USER}} By: ${{github.actor}}
- uses: snow-actions/line-notify@v1.1.0 - uses: snow-actions/line-notify@v1.1.0
if: failure() if: failure()
with: with:
@ -84,4 +84,4 @@ jobs:
-Failure❌❌❌ -Failure❌❌❌
Image: ${{env.IMAGE_NAME}} Image: ${{env.IMAGE_NAME}}
Version: ${{ steps.gen_ver.outputs.IMAGE_VER }} Version: ${{ steps.gen_ver.outputs.IMAGE_VER }}
By: ${{secrets.DOCKER_USER}} By: ${{github.actor}}

View file

@ -8,7 +8,7 @@ const orgEmployeePos = `${env.API_URI}/org/employee/pos`;
export default { export default {
/** โครงสร้างอัตรากำลัง*/ /** โครงสร้างอัตรากำลัง*/
activeOrganization: `${organization}/active`, activeOrganization: `${organization}/active`,
orgByid: (id: string) => `${organization}/${id}`, orgByid: (id: string) => `${organization}/admin/${id}`,
createOrganization: `${organization}/draft`, createOrganization: `${organization}/draft`,
createOrgLevel: (type: string) => `${organization}/${type}`, createOrgLevel: (type: string) => `${organization}/${type}`,
orgLevelByid: (type: string, id: string) => `${organization}/${type}/${id}`, orgLevelByid: (type: string, id: string) => `${organization}/${type}/${id}`,
@ -27,7 +27,7 @@ export default {
orgPosLevel: `${orgPos}/level`, orgPosLevel: `${orgPos}/level`,
orgPosMaster: `${orgPos}/master`, orgPosMaster: `${orgPos}/master`,
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`, orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
orgPosMasterList: `${orgPos}/master/list`, orgPosMasterList: `${orgPos}/admin/master/list`,
orgPosSort: `${orgPos}/sort`, orgPosSort: `${orgPos}/sort`,
orgPosMove: `${orgPos}/move`, orgPosMove: `${orgPos}/move`,
organizationShortName: `${organization}/sort`, organizationShortName: `${organization}/sort`,

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@ const { showLoader, hideLoader, messageError } = mixin;
async function genReport(data: any, fileName: string, type: string = "docx") { async function genReport(data: any, fileName: string, type: string = "docx") {
showLoader(); showLoader();
await axios await axios
.post(`${config.API.reportTemplate}/docx/html`, data, { .post(`${config.API.reportTemplate}/docx`, data, {
headers: headers:
type == "docx" type == "docx"
? { ? {