refactor!: change typo field and reset migration
This commit is contained in:
parent
d0d59cea0d
commit
0e2cc3cb21
58 changed files with 327 additions and 784 deletions
|
|
@ -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 },
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue