This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-16 10:26:09 +07:00
parent 51707646e7
commit df481043b1
9 changed files with 138 additions and 91 deletions

View file

@ -297,15 +297,15 @@ async function onClickEdit(node: OrgTree) {
* @param id ID โครงสราง
* @param rootId RootID
*/
async function onClickDel(type: number, id: string, rootId: string) {
function onClickDel(type: number, id: string, rootId: string) {
const level = store.checkLevel(type);
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.orgLevelByid(level.toLocaleLowerCase(), id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
deleteUpdate(rootId, id);
.then(async () => {
await deleteUpdate(rootId, id);
await success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {
messageError($q, err);
@ -321,7 +321,7 @@ async function onClickDel(type: number, id: string, rootId: string) {
* @param id ID โครงสราง
* @param level ระดบโครงสราง
*/
async function onClickSort(id: string, level: number) {
function onClickSort(id: string, level: number) {
type.value = level;
modalSortAgency.value = true;
if (id) {