Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export default {
}).map(([uuid, setting]) => {
return this.$root.manifest[uuid];
}).reduce((groups, asset) => {
console.log(asset);

if(!(asset.type in groups)) {
groups[asset.type] = {
firstAsset: asset,
Expand Down
2 changes: 2 additions & 0 deletions resources/js/processes/export/components/MainAssetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ export default {
importingName: asset.name,
existingId: asset.existing_id,
matchedBy: asset.matched_by,
existingUpdatedAt: asset.existing_attributes?.updated_at,
importingUpdatedAt: asset.attributes?.updated_at,
};
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ export default {
importingName: asset.name,
existingId: asset.existing_id,
matchedBy: asset.matched_by,
existingUpdatedAt: asset.existing_attributes.updated_at,
importingUpdatedAt: asset.attributes.updated_at,
existingUpdatedAt: asset.existing_attributes?.updated_at,
importingUpdatedAt: asset.attributes?.updated_at,
};
});
}
Expand Down
24 changes: 12 additions & 12 deletions resources/js/processes/import/components/ImportProcessModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,21 @@
return this.$t('Caution: {{type}} Already Exists', {type: asset.typeHuman});
},
helperText(asset) {
let assetTiming = this.$t("This environment already contains ");
let text = "This environment already contains the {{ item }} named '{{ name }}.'";
if (asset.existingUpdatedAt && asset.importingUpdatedAt) {
const existingUpdatedAt = new Date(asset.existingUpdatedAt);
const importingUpdatedAt = new Date(`${asset.importingUpdatedAt.replace(" ", "T")}.000000Z`);

const existingUpdatedAt = new Date(asset.existingUpdatedAt);
const importingUpdatedAt = new Date(`${asset.importingUpdatedAt.replace(" ", "T")}.000000Z`);

if (existingUpdatedAt > importingUpdatedAt) {
assetTiming += this.$t("a newer");
} else if (existingUpdatedAt < importingUpdatedAt) {
assetTiming += this.$t("an older");
} else {
assetTiming += this.$t("the same");
if (existingUpdatedAt > importingUpdatedAt) {
text = "This environment already contains a newer version of the {{ item }} named '{{ name }}.'";
} else if (existingUpdatedAt < importingUpdatedAt) {
text = "This environment already contains an older version of the {{ item }} named '{{ name }}.'";
} else {
text = "This environment already contains the same version of the {{ item }} named '{{ name }}.'";
}
}

const text = this.$t('{{ assetTiming }} version of the {{ item }} named "{{ name }}."', {
assetTiming,
text = this.$t(text, {
item: asset.typeHuman.toLowerCase(),
name: asset.importingName,
});
Expand Down
8 changes: 4 additions & 4 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1748,10 +1748,10 @@
"Import all assets from the uploaded package.":"Import all assets from the uploaded package.",
"Custom":"Custom",
"Select which assets from the uploaded package should be imported to this environment.":"Select which assets from the uploaded package should be imported to this environment.",
"This environment already contains ": "This environment already contains ",
"a newer": "a newer",
"an older": "an older",
"the same": "the same",
"This environment already contains the {{ item }} named '{{ name }}.'": "This environment already contains the {{ item }} named '{{ name }}.'",
"This environment already contains a newer version of the {{ item }} named '{{ name }}.'":"This environment already contains a newer version of the {{ item }} named '{{ name }}.'",
"This environment already contains an older version of the {{ item }} named '{{ name }}.'":"This environment already contains an older version of the {{ item }} named '{{ name }}.'",
"This environment already contains the same version of the {{ item }} named '{{ name }}.'":"This environment already contains the same version of the {{ item }} named '{{ name }}.'",
"You are about to import":"You are about to import",
"Process was successfully imported":"Process was successfully imported",
"Select Import Type":"Select Import Type",
Expand Down