no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-28 15:49:55 +07:00
parent 5a1c1fffae
commit c467d12d2e
4 changed files with 14 additions and 8 deletions

View file

@ -39,9 +39,12 @@ const closeModal = () => {
props.close();
};
const clickSave = () => {
console.log(props.insigniadata);
dialogConfirm($q, () => {
if (props.actionType === "insignia") {
props.save(
props.insigniadata.id,
props.insigniadata.insigniaId,
amount.value,
props.insigniadata.year

View file

@ -166,9 +166,6 @@ watch(tab, () => {
fecthlistInsignia();
});
// const selectorInsignia = () => {
// fecthlistInsignia();
// };
const selectorRound = (round: string) => {
selectRound.value = round;
const yearFilter = selectRoundOption.value.find((x: any) => x.id == round);
@ -234,7 +231,12 @@ const save = async (insigniaId: string, total: string) => {
close();
});
};
const saveEdit = async (insigniaId: string, total: Number, year: Number) => {
const saveEdit = async (
id: string,
insigniaId: string,
total: Number,
year: Number
) => {
showLoader();
let body = {
insignia: insigniaId,
@ -242,7 +244,7 @@ const saveEdit = async (insigniaId: string, total: Number, year: Number) => {
total: Number(total),
};
await http
.put(config.API.insigniaManageById(insigniaId), body)
.put(config.API.insigniaManageById(id), body)
.then(async () => {
success($q, "แก้ไขข้อมูลสำเร็จ");
await fecthlistInsignia();