优化
This commit is contained in:
@@ -16,6 +16,23 @@ const CONFIGURED_MODULES = ['merchant-qualification-fixture', 'customers', 'over
|
||||
|
||||
export function normalizeModuleOrder(modules) {
|
||||
const normalized = [...modules]
|
||||
const manualMatrixIndex = normalized.indexOf('manual-state-matrix')
|
||||
if (manualMatrixIndex >= 0) {
|
||||
const internalGroupIndex = normalized.indexOf('order-inbound-status-fixtures')
|
||||
if (internalGroupIndex >= 0) normalized.splice(internalGroupIndex, 1)
|
||||
const prerequisites = [
|
||||
'merchant-qualification-fixture',
|
||||
'phase3-container-loading',
|
||||
'phase3-loading',
|
||||
'phase3-customs',
|
||||
'phase3-loading-finalize',
|
||||
]
|
||||
for (const prerequisite of prerequisites) {
|
||||
if (!normalized.includes(prerequisite)) {
|
||||
normalized.splice(normalized.indexOf('manual-state-matrix'), 0, prerequisite)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (normalized.includes('fee-items')) {
|
||||
const prerequisites = ['merchant-qualification-fixture', 'orders']
|
||||
const feeItemsIndex = normalized.indexOf('fee-items')
|
||||
|
||||
Reference in New Issue
Block a user