repair: reset brand device without sparepart

This commit is contained in:
2025-11-24 14:56:33 +07:00
parent 98a1b15669
commit 4253e29889
3 changed files with 242 additions and 227 deletions

View File

@@ -13,8 +13,6 @@ const getErrorCodesByBrandIdDb = async (brandId) => {
return result.recordset;
};
// Create error code for brand
const createErrorCodeDb = async (brandId, data) => {
const store = {
brand_id: brandId,
@@ -33,7 +31,6 @@ const createErrorCodeDb = async (brandId, data) => {
return insertedId;
};
// Update error code by brand ID and error code
const updateErrorCodeDb = async (brandId, errorCode, data) => {
const store = { ...data };
const whereData = {
@@ -46,7 +43,6 @@ const updateErrorCodeDb = async (brandId, errorCode, data) => {
return true;
};
// Soft delete error code by brand ID and error code
const deleteErrorCodeDb = async (brandId, errorCode, deletedBy) => {
const queryText = `
UPDATE brand_code
@@ -57,7 +53,6 @@ const deleteErrorCodeDb = async (brandId, errorCode, deletedBy) => {
return true;
};
// Get error code by error_code_id
const getErrorCodeByIdDb = async (error_code_id) => {
const queryText = `
SELECT