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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff