refactor!: change typo field and reset migration

This commit is contained in:
Methapon2001 2024-06-28 09:35:32 +07:00
parent d0d59cea0d
commit 0e2cc3cb21
58 changed files with 327 additions and 784 deletions

View file

@ -114,7 +114,7 @@ export class ProductGroup extends Controller {
statusOrder: +(body.status === "INACTIVE"),
code: `G${last.value.toString().padStart(2, "0")}`,
createdBy: req.user.name,
updateBy: req.user.name,
updatedBy: req.user.name,
},
});
},
@ -141,7 +141,7 @@ export class ProductGroup extends Controller {
}
const record = await prisma.productGroup.update({
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updateBy: req.user.name },
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updatedBy: req.user.name },
where: { id: groupId },
});

View file

@ -174,7 +174,7 @@ export class ProductController extends Controller {
statusOrder: +(body.status === "INACTIVE"),
code: `${body.code.toLocaleUpperCase()}${last.value.toString().padStart(3, "0")}`,
createdBy: req.user.name,
updateBy: req.user.name,
updatedBy: req.user.name,
},
});
},
@ -230,7 +230,7 @@ export class ProductController extends Controller {
}
const record = await prisma.product.update({
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updateBy: req.user.name },
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updatedBy: req.user.name },
where: { id: productId },
});

View file

@ -128,7 +128,7 @@ export class ProductType extends Controller {
statusOrder: +(body.status === "INACTIVE"),
code: `T${productGroup.code}${last.value.toString().padStart(2, "0")}`,
createdBy: req.user.name,
updateBy: req.user.name,
updatedBy: req.user.name,
},
});
},
@ -173,7 +173,7 @@ export class ProductType extends Controller {
}
const record = await prisma.productType.update({
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updateBy: req.user.name },
data: { ...body, statusOrder: +(body.status === "INACTIVE"), updatedBy: req.user.name },
where: { id: typeId },
});