refactor(intake): move document revision file helper
This commit is contained in:
parent
d5834de00e
commit
14d7ddcd4e
@ -426,6 +426,7 @@ import {
|
||||
getDocumentWorkspaceCategoryLabel,
|
||||
getDocumentWorkspaceShortcutCountClass,
|
||||
getDocumentWorkspaceSidebarButtonClass,
|
||||
buildDocumentWorkspaceRevisionFileEntries,
|
||||
getProductPhotoPanelCompactTitle,
|
||||
getProductPhotoPanelTitle,
|
||||
getSupplementWorkspaceShortcutButtonClass,
|
||||
@ -4523,34 +4524,6 @@ function createInitialDocumentWorkspaceNotes(
|
||||
);
|
||||
}
|
||||
|
||||
function buildDocumentWorkspaceRevisionFileEntries(
|
||||
uploadFiles: NonIntegratedUploadFile[],
|
||||
category: DocumentWorkspaceCategory,
|
||||
) {
|
||||
return uploadFiles
|
||||
.filter((file) => file.category === category)
|
||||
.map((file) => ({
|
||||
id: file.id,
|
||||
name: file.name,
|
||||
category: file.category,
|
||||
dataUrl: file.dataUrl,
|
||||
mimeType: file.mimeType,
|
||||
productDataGroup: file.productDataGroup,
|
||||
detectionAssetType: file.detectionAssetType,
|
||||
photoGroup: file.photoGroup,
|
||||
photoSlot: file.photoSlot,
|
||||
productPhotoStyleKey: file.productPhotoStyleKey,
|
||||
installStyleKey: file.installStyleKey,
|
||||
installAssetType: file.installAssetType,
|
||||
installVersionLabel: file.installVersionLabel,
|
||||
installIsCurrentVersion: file.installIsCurrentVersion,
|
||||
packagingStyleKey: file.packagingStyleKey,
|
||||
packagingAssetType: file.packagingAssetType,
|
||||
factoryQualityStyleKey: file.factoryQualityStyleKey,
|
||||
factoryQualityAssetType: file.factoryQualityAssetType,
|
||||
}));
|
||||
}
|
||||
|
||||
function createInitialDocumentWorkspaceConfirmations(
|
||||
product: NonIntegratedProductRecord | null,
|
||||
): NonIntegratedDocumentWorkspaceConfirmationMap {
|
||||
|
||||
@ -78,6 +78,34 @@ export function areProductPhotoSelectionsEqual(
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function buildDocumentWorkspaceRevisionFileEntries(
|
||||
uploadFiles: NonIntegratedUploadFile[],
|
||||
category: DocumentWorkspaceCategory,
|
||||
) {
|
||||
return uploadFiles
|
||||
.filter((file) => file.category === category)
|
||||
.map((file) => ({
|
||||
id: file.id,
|
||||
name: file.name,
|
||||
category: file.category,
|
||||
dataUrl: file.dataUrl,
|
||||
mimeType: file.mimeType,
|
||||
productDataGroup: file.productDataGroup,
|
||||
detectionAssetType: file.detectionAssetType,
|
||||
photoGroup: file.photoGroup,
|
||||
photoSlot: file.photoSlot,
|
||||
productPhotoStyleKey: file.productPhotoStyleKey,
|
||||
installStyleKey: file.installStyleKey,
|
||||
installAssetType: file.installAssetType,
|
||||
installVersionLabel: file.installVersionLabel,
|
||||
installIsCurrentVersion: file.installIsCurrentVersion,
|
||||
packagingStyleKey: file.packagingStyleKey,
|
||||
packagingAssetType: file.packagingAssetType,
|
||||
factoryQualityStyleKey: file.factoryQualityStyleKey,
|
||||
factoryQualityAssetType: file.factoryQualityAssetType,
|
||||
}));
|
||||
}
|
||||
export const PRODUCT_PHOTO_NINE_VIEW_SLOTS: {
|
||||
key: ProductPhotoNineViewSlot;
|
||||
label: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user