Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging

This commit is contained in:
Fadli 2023-04-11 11:21:22 +07:00
commit f1df995968
2 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,11 @@ export class Product extends BaseModel {
})
type: string;
@Column({
type: 'uuid'
})
sub_categories_id: string;
@ManyToOne(
() => {
return ProductSubCategories;

View File

@ -86,7 +86,7 @@ export class ProductService {
//TODO : Handle Update Product
productData.name = it[1];
productData.status = it[5] == 'active' ? 'ACTIVE' : 'NOT ACTIVE';
productData.sub_categories = it[2];
productData.sub_categories_id = subCategories.id;
await this.productRepository.save(productData);
//TODO : Handle History Price