refactor(intake): move empty sku item helper
This commit is contained in:
parent
863e4a470d
commit
993675ef3f
@ -497,6 +497,7 @@ import {
|
||||
} from "./reviewSheetHelpers";
|
||||
import {
|
||||
cloneSkuItemForNextRow,
|
||||
createEmptySkuItem,
|
||||
syncSkuItemsBrandPrefix,
|
||||
} from "./skuBrandHelpers";
|
||||
import {
|
||||
@ -1513,45 +1514,6 @@ const EMPTY_FORM_VALUES: FormValues = {
|
||||
craftDetail: "",
|
||||
};
|
||||
|
||||
function createEmptySkuItem(): NonIntegratedSkuItem {
|
||||
return {
|
||||
id: buildNonIntegratedSkuId(),
|
||||
skuSequence: 1,
|
||||
batchNo: 1,
|
||||
packageGroupId: "",
|
||||
packageSuffix: "",
|
||||
image: "",
|
||||
imageName: "",
|
||||
model: "",
|
||||
skuCode: "",
|
||||
setCount: "1",
|
||||
specName: "",
|
||||
barcode: "",
|
||||
size: "",
|
||||
color: "",
|
||||
material: "",
|
||||
boardMaterialType: "",
|
||||
versionNo: "V01",
|
||||
attributeCode: "",
|
||||
drawingId: "",
|
||||
installMethod: "",
|
||||
executeStandard: "",
|
||||
nationalStandardCompliant: "",
|
||||
manufacturer: "",
|
||||
manufacturerCode: "",
|
||||
salesStatus: "",
|
||||
tagMaterial: "",
|
||||
model3dFileName: "",
|
||||
model3dDataUrl: "",
|
||||
model3dNodeOffsets: EMPTY_PREVIEW_NODE_OFFSET_MAP,
|
||||
model3dNodeRotations: EMPTY_PREVIEW_NODE_ROTATION_MAP,
|
||||
model3dNodeMaterialIds: {},
|
||||
model3dUvConfig: null,
|
||||
model3dPreviewNodes: [],
|
||||
holePoints: [],
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeSeriesDraftSkuSequence(
|
||||
option: SeriesDraftSkuOption,
|
||||
fallbackIndex: number,
|
||||
|
||||
@ -3,6 +3,49 @@ import {
|
||||
buildNonIntegratedSkuId,
|
||||
type NonIntegratedSkuItem,
|
||||
} from "./nonIntegratedStorage";
|
||||
import {
|
||||
EMPTY_PREVIEW_NODE_OFFSET_MAP,
|
||||
EMPTY_PREVIEW_NODE_ROTATION_MAP,
|
||||
} from "./previewState";
|
||||
|
||||
export function createEmptySkuItem(): NonIntegratedSkuItem {
|
||||
return {
|
||||
id: buildNonIntegratedSkuId(),
|
||||
skuSequence: 1,
|
||||
batchNo: 1,
|
||||
packageGroupId: "",
|
||||
packageSuffix: "",
|
||||
image: "",
|
||||
imageName: "",
|
||||
model: "",
|
||||
skuCode: "",
|
||||
setCount: "1",
|
||||
specName: "",
|
||||
barcode: "",
|
||||
size: "",
|
||||
color: "",
|
||||
material: "",
|
||||
boardMaterialType: "",
|
||||
versionNo: "V01",
|
||||
attributeCode: "",
|
||||
drawingId: "",
|
||||
installMethod: "",
|
||||
executeStandard: "",
|
||||
nationalStandardCompliant: "",
|
||||
manufacturer: "",
|
||||
manufacturerCode: "",
|
||||
salesStatus: "",
|
||||
tagMaterial: "",
|
||||
model3dFileName: "",
|
||||
model3dDataUrl: "",
|
||||
model3dNodeOffsets: EMPTY_PREVIEW_NODE_OFFSET_MAP,
|
||||
model3dNodeRotations: EMPTY_PREVIEW_NODE_ROTATION_MAP,
|
||||
model3dNodeMaterialIds: {},
|
||||
model3dUvConfig: null,
|
||||
model3dPreviewNodes: [],
|
||||
holePoints: [],
|
||||
};
|
||||
}
|
||||
|
||||
export function syncSkuItemsBrandPrefix(
|
||||
items: NonIntegratedSkuItem[],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user