pinia store data ข้อมูลหลัก

ขาด District /sub district
This commit is contained in:
AnandaTon 2023-06-15 16:47:16 +07:00
parent e3d929f7bf
commit 6a3da944bc
24 changed files with 3026 additions and 779 deletions

View file

@ -2,129 +2,130 @@
* api * api
* เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน * เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน
*/ */
import env from "../index" import env from "../index";
const organization = `${env.API_URI}/metadata/organization/` const organization = `${env.API_URI}/metadata/organization/`;
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/` const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`;
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/` const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`;
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/` const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`;
const organizationType = `${env.API_URI}/metadata/organization-type/` const organizationType = `${env.API_URI}/metadata/organization-type/`;
const organizationLevel = `${env.API_URI}/metadata/organization-level/` const organizationLevel = `${env.API_URI}/metadata/organization-level/`;
const organizationStatus = `${env.API_URI}/metadata/organization-status/` const organizationStatus = `${env.API_URI}/metadata/organization-status/`;
const organizationAgency = `${env.API_URI}/metadata/organization-agency/` const organizationAgency = `${env.API_URI}/metadata/organization-agency/`;
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/` const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`;
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/` const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`;
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/` const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`;
const organizationFax = `${env.API_URI}/metadata/organization-fax/` const organizationFax = `${env.API_URI}/metadata/organization-fax/`;
const dashbord = `${env.API_URI}/metadata/dashbord/` const dashbord = `${env.API_URI}/metadata/dashbord/`;
export default { export default {
/** /**
* api tab tab * api tab tab
*/ */
organization, organization,
countDashbordSubHistory: (type: number) => `${dashbord}${type}`, countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
countDashbordHistory: `${dashbord}`, countDashbordHistory: `${dashbord}`,
/** /**
* api * api
*/ */
listOrganizationOrganizationHistory: `${organizationOrganization}history`, organizationOrganization,
listOrganizationOrganizationHistoryId: (id: string) => listOrganizationOrganizationHistory: `${organizationOrganization}history`,
`${organizationOrganization}history/${id}`, listOrganizationOrganizationHistoryId: (id: string) =>
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`, `${organizationOrganization}history/${id}`,
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`, listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
/** /**
* api * api
*/ */
organizationShortName, organizationShortName,
listOrganizationShortNameHistory: `${organizationShortName}history`, listOrganizationShortNameHistory: `${organizationShortName}history`,
listOrganizationShortNameHistoryId: (id: string) => listOrganizationShortNameHistoryId: (id: string) =>
`${organizationShortName}history/${id}`, `${organizationShortName}history/${id}`,
listOrganizationShortNamePublished: `${organizationShortName}history/published`, listOrganizationShortNamePublished: `${organizationShortName}history/published`,
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`, listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
organizationCode: `${organizationCode}organization-code`, organizationCode: `${organizationCode}organization-code`,
organizationGovernmentCode: (id: string) => organizationGovernmentCode: (id: string) =>
`${organizationCode}government/${id}`, `${organizationCode}government/${id}`,
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`, organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
/** /**
* api * api
*/ */
organizationType, organizationType,
listOrganizationTypeHistory: `${organizationType}history`, listOrganizationTypeHistory: `${organizationType}history`,
listOrganizationTypeHistoryId: (id: string) => listOrganizationTypeHistoryId: (id: string) =>
`${organizationType}history/${id}`, `${organizationType}history/${id}`,
listOrganizationTypePublished: `${organizationType}history/published`, listOrganizationTypePublished: `${organizationType}history/published`,
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`, listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
/** /**
* api * api
*/ */
organizationLevel, organizationLevel,
listOrganizationLevelHistory: `${organizationLevel}history`, listOrganizationLevelHistory: `${organizationLevel}history`,
listOrganizationLevelHistoryId: (id: string) => listOrganizationLevelHistoryId: (id: string) =>
`${organizationLevel}history/${id}`, `${organizationLevel}history/${id}`,
listOrganizationLevelPublished: `${organizationLevel}history/published`, listOrganizationLevelPublished: `${organizationLevel}history/published`,
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`, listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
/** /**
* api * api
*/ */
organizationStatus, organizationStatus,
listOrganizationStatusHistory: `${organizationStatus}history`, listOrganizationStatusHistory: `${organizationStatus}history`,
listOrganizationStatusHistoryId: (id: string) => listOrganizationStatusHistoryId: (id: string) =>
`${organizationStatus}history/${id}`, `${organizationStatus}history/${id}`,
listOrganizationStatusPublished: `${organizationStatus}history/published`, listOrganizationStatusPublished: `${organizationStatus}history/published`,
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`, listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
/** /**
* api * api
*/ */
organizationAgency, organizationAgency,
listOrganizationAgencyHistory: `${organizationAgency}history`, listOrganizationAgencyHistory: `${organizationAgency}history`,
listOrganizationAgencyHistoryId: (id: string) => listOrganizationAgencyHistoryId: (id: string) =>
`${organizationAgency}history/${id}`, `${organizationAgency}history/${id}`,
listOrganizationAgencyPublished: `${organizationAgency}history/published`, listOrganizationAgencyPublished: `${organizationAgency}history/published`,
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`, listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
/** /**
* api * api
*/ */
organizationGovernmentAgency, organizationGovernmentAgency,
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`, listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
listOrganizationGovernmentAgencyHistoryId: (id: string) => listOrganizationGovernmentAgencyHistoryId: (id: string) =>
`${organizationGovernmentAgency}history/${id}`, `${organizationGovernmentAgency}history/${id}`,
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`, listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`, listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
/** /**
* api * api
*/ */
organizationTelExternal, organizationTelExternal,
listOrganizationTelExternalHistory: `${organizationTelExternal}history`, listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
listOrganizationTelExternalHistoryId: (id: string) => listOrganizationTelExternalHistoryId: (id: string) =>
`${organizationTelExternal}history/${id}`, `${organizationTelExternal}history/${id}`,
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`, listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`, listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
/** /**
* api * api
*/ */
organizationTelInternal, organizationTelInternal,
listOrganizationTelInternalHistory: `${organizationTelInternal}history`, listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
listOrganizationTelInternalHistoryId: (id: string) => listOrganizationTelInternalHistoryId: (id: string) =>
`${organizationTelInternal}history/${id}`, `${organizationTelInternal}history/${id}`,
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`, listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`, listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
/** /**
* api * api
*/ */
organizationFax, organizationFax,
listOrganizationFaxHistory: `${organizationFax}history`, listOrganizationFaxHistory: `${organizationFax}history`,
listOrganizationFaxHistoryId: (id: string) => listOrganizationFaxHistoryId: (id: string) =>
`${organizationFax}history/${id}`, `${organizationFax}history/${id}`,
listOrganizationFaxPublished: `${organizationFax}history/published`, listOrganizationFaxPublished: `${organizationFax}history/published`,
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`, listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
} };

View file

@ -29,6 +29,7 @@ export default {
/** /**
* api * api
*/ */
district,
listDistrict: (id: string) => `${district}${id}`, listDistrict: (id: string) => `${district}${id}`,
listDistrictHistory: `${district}history`, listDistrictHistory: `${district}history`,
listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`, listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`,

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationFax,
dataOrganizationFax,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationFax(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationFaxHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationFaxHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationLevel,
dataOrganizationLevel,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationLevel(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationLevelHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationLevelHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -216,7 +216,8 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getOrganization, dataOrganization } =
store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -399,38 +400,43 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganization(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationOrganizationHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationOrganizationHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
note: e.note, // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}); // createdFullName: e.createdFullName,
}) // createdUserId: e.createdUserId,
.catch((e) => { // lastUpdateUserId: e.lastUpdateUserId,
messageError($q, e); // note: e.note,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -257,7 +257,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationShortName,
dataOrganizationShortName,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -488,40 +493,45 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationShortName(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationShortNameHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationShortNameHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
agencyCode: e.agencyCode, // version.value = data.version; // published= draft=
governmentCode: e.governmentCode, // idVersion.value = data.id; // id mongodb
name: e.name, // data.items.map((e: RequestItemsHistoryObject) => {
createdAt: e.createdAt, // rows.value.push({
lastUpdatedAt: e.lastUpdatedAt, // id: e.id,
lastUpdateFullName: e.lastUpdateFullName, // agencyCode: e.agencyCode,
isActive: e.isActive, // governmentCode: e.governmentCode,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
note: e.note, // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}); // createdFullName: e.createdFullName,
}) // createdUserId: e.createdUserId,
.catch((e) => { // lastUpdateUserId: e.lastUpdateUserId,
messageError($q, e); // note: e.note,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationStatus,
dataOrganizationStatus,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationStatus(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationStatusHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationStatusHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationTelExternal,
dataOrganizationTelExternal,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationTelExternal(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationTelExternalHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationTelExternalHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationTelInternal,
dataOrganizationTelInternal,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationTelInternal(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationTelInternalHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationTelInternalHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getOrganizationType,
dataOrganizationType,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -363,37 +368,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getOrganizationType(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listOrganizationTypeHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listOrganizationTypeHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -208,7 +208,7 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getBlood, dataBlood } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -367,37 +367,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getBlood(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listBloodGroupHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listBloodGroupHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getEducation, dataEducation } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +364,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getEducation(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listEducationLevelHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listEducationLevelHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getGender, dataGenders } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +364,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getGender(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listGenderHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listGenderHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -217,7 +217,7 @@ const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเ
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getProvince, dataProvince } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -376,37 +376,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getProvince(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listProvinceHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listProvinceHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getRelationship, dataRelationship } =
store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +365,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getRelationship(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listRelationshipHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listRelationshipHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getReligion, dataReligion } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +364,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getReligion(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listReligionHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listReligionHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getPositionExecutive,
dataPositionExecutive,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +369,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionExecutive(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionExecutiveHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionExecutiveHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getPositionExecutiveSide,
dataPositionExecutiveSide,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -400,38 +405,43 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionExecutiveSide(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionExecutiveSideHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionExecutiveSideHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
note: e.note, // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}); // createdFullName: e.createdFullName,
}) // createdUserId: e.createdUserId,
.catch((e) => { // lastUpdateUserId: e.lastUpdateUserId,
messageError($q, e); // note: e.note,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -268,7 +268,8 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getPositionLevel, dataPositionLevel } =
store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -475,45 +476,50 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionLevel(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionLevelHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionLevelHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
level: e.level, // version.value = data.version; // published= draft=
name: e.name, // idVersion.value = data.id; // id mongodb
shortName: e.shortName, // data.items.map((e: RequestItemsHistoryObject) => {
createdAt: e.createdAt, // rows.value.push({
lastUpdatedAt: e.lastUpdatedAt, // id: e.id,
lastUpdateFullName: e.lastUpdateFullName, // level: e.level,
isActive: e.isActive, // name: e.name,
createdFullName: e.createdFullName, // shortName: e.shortName,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
rows.value.sort( // createdFullName: e.createdFullName,
( // createdUserId: e.createdUserId,
firstItem: RequestItemsHistoryObject, // lastUpdateUserId: e.lastUpdateUserId,
secondItem: RequestItemsHistoryObject // });
) => firstItem.level - secondItem.level // });
); // rows.value.sort(
}) // (
.catch((e) => { // firstItem: RequestItemsHistoryObject,
messageError($q, e); // secondItem: RequestItemsHistoryObject
}) // ) => firstItem.level - secondItem.level
.finally(() => { // );
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getPositionLine, dataPositionLine } =
store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +365,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionLine(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionLineHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionLineHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getPositionPathSide,
dataPositionPathSide,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -400,38 +405,43 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionPathSide(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionSideHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionSideHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
note: e.note, // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}); // createdFullName: e.createdFullName,
}) // createdUserId: e.createdUserId,
.catch((e) => { // lastUpdateUserId: e.lastUpdateUserId,
messageError($q, e); // note: e.note,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const {
manageData,
changeManageColumns,
getPositionStatus,
dataPositionStatus,
} = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +369,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionStatus(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionStatusHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionStatusHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

View file

@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { success, dateText, messageError, showLoader, hideLoader } = mixin; const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore(); const store = useManageDataStore();
const { manageData, changeManageColumns } = store; const { manageData, changeManageColumns, getPositionType, dataPositionType } =
store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
@ -364,37 +365,42 @@ const $q = useQuasar();
/** /**
* งก get data าส * งก get data าส
*/ */
const fetchData = async () => { const fetchData = async (load: boolean = false) => {
await props.fetchDataComponent(); await props.fetchDataComponent();
rows.value.splice(0); const result = await getPositionType(false, load);
showLoader(); version.value = result.version; // published= draft=
await http idVersion.value = result.idversion; // id mongodb
.get(config.API.listPositionTypeHistory) rows.value = result.data;
.then((res) => { updateData.value = false;
let data = res.data.result; // rows.value.splice(0);
version.value = data.version; // published= draft= // showLoader();
idVersion.value = data.id; // id mongodb // await http
data.items.map((e: RequestItemsHistoryObject) => { // .get(config.API.listPositionTypeHistory)
rows.value.push({ // .then((res) => {
id: e.id, // let data = res.data.result;
name: e.name, // version.value = data.version; // published= draft=
createdAt: e.createdAt, // idVersion.value = data.id; // id mongodb
lastUpdatedAt: e.lastUpdatedAt, // data.items.map((e: RequestItemsHistoryObject) => {
lastUpdateFullName: e.lastUpdateFullName, // rows.value.push({
isActive: e.isActive, // id: e.id,
createdFullName: e.createdFullName, // name: e.name,
createdUserId: e.createdUserId, // createdAt: e.createdAt,
lastUpdateUserId: e.lastUpdateUserId, // lastUpdatedAt: e.lastUpdatedAt,
}); // lastUpdateFullName: e.lastUpdateFullName,
}); // isActive: e.isActive,
}) // createdFullName: e.createdFullName,
.catch((e) => { // createdUserId: e.createdUserId,
messageError($q, e); // lastUpdateUserId: e.lastUpdateUserId,
}) // });
.finally(() => { // });
updateData.value = false; // })
hideLoader(); // .catch((e) => {
}); // messageError($q, e);
// })
// .finally(() => {
// updateData.value = false;
// hideLoader();
// });
}; };
/** /**

File diff suppressed because it is too large Load diff