Skip to content

Commit a00dd5a

Browse files
Merge pull request #584 from OneSila/development
Collaboration, languages refactor and more
2 parents f3374d0 + 9548a2c commit a00dd5a

File tree

64 files changed

+4680
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4680
-740
lines changed

src/assets/audio/notification.mp3

7.28 KB
Binary file not shown.

src/core/integrations/integrations/integrations-show/containers/document-types/containers/remote-document-types/components/categories-lists/MiraklDocumentTypeCategoriesList.vue

Lines changed: 522 additions & 0 deletions
Large diffs are not rendered by default.

src/core/integrations/integrations/integrations-show/containers/document-types/containers/remote-document-types/components/categories-lists/RemoteDocumentTypeCategoriesList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { computed } from 'vue';
33
import AmazonDocumentTypeCategoriesList from './AmazonDocumentTypeCategoriesList.vue';
44
import EbayDocumentTypeCategoriesList from './EbayDocumentTypeCategoriesList.vue';
5+
import MiraklDocumentTypeCategoriesList from './MiraklDocumentTypeCategoriesList.vue';
56
import SheinDocumentTypeCategoriesList from './SheinDocumentTypeCategoriesList.vue';
67
78
type CategoryId = string | number;
@@ -24,6 +25,8 @@ const currentComponent = computed(() => {
2425
return AmazonDocumentTypeCategoriesList;
2526
case 'ebay':
2627
return EbayDocumentTypeCategoriesList;
28+
case 'mirakl':
29+
return MiraklDocumentTypeCategoriesList;
2730
case 'shein':
2831
return SheinDocumentTypeCategoriesList;
2932
default:
@@ -36,7 +39,7 @@ const updateValue = (value: CategoryId[]) => {
3639
};
3740
3841
const componentProps = computed(() =>
39-
props.type === 'ebay' || props.type === 'amazon' || props.type === 'shein'
42+
props.type === 'ebay' || props.type === 'amazon' || props.type === 'mirakl' || props.type === 'shein'
4043
? {
4144
salesChannelId: props.salesChannelId ?? null,
4245
errorMessage: props.errorMessage ?? '',

src/core/integrations/integrations/integrations-show/containers/properties/containers/remote-properties/components/RemotePropertyEdit.vue

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<script setup lang="ts">
2+
import { ref } from 'vue';
3+
import { useI18n } from 'vue-i18n';
4+
import { useRoute } from 'vue-router';
25
import GeneralTemplate from "../../../../../../../../../shared/templates/GeneralTemplate.vue";
36
import { Breadcrumbs } from "../../../../../../../../../shared/components/molecules/breadcrumbs";
47
import { GeneralForm } from "../../../../../../../../../shared/components/organisms/general-form";
58
import type { FormConfig } from "../../../../../../../../../shared/components/organisms/general-form/formConfig";
9+
import { Tabs } from "../../../../../../../../../shared/components/molecules/tabs";
10+
import { CollaborationTab } from "../../../../../../../../../shared/components/organisms/collaboration-tab";
611
712
interface BreadcrumbLink {
813
path?: {
@@ -17,6 +22,13 @@ const props = defineProps<{
1722
breadcrumbsLinks: BreadcrumbLink[];
1823
formConfig: FormConfig | null;
1924
}>();
25+
const { t } = useI18n();
26+
const route = useRoute();
27+
const targetId = ref(String(route.params.id));
28+
const tabItems = [
29+
{ name: 'general', label: t('shared.tabs.mapping'), icon: 'circle-info', alwaysRender: true },
30+
{ name: 'collaboration', label: t('shared.tabs.collaboration'), icon: 'comment-dots' },
31+
];
2032
2133
const emit = defineEmits<{
2234
(e: 'set-data', value: any): void;
@@ -38,25 +50,32 @@ const handleFormUpdated = (form: Record<string, any>) => {
3850
<Breadcrumbs :links="props.breadcrumbsLinks" />
3951
</template>
4052
<template #content>
41-
<GeneralForm
42-
v-if="props.formConfig"
43-
:config="props.formConfig"
44-
@set-data="handleSetData"
45-
@form-updated="handleFormUpdated"
46-
>
47-
<template #before-fields>
48-
<slot name="before-form" />
53+
<Tabs :tabs="tabItems">
54+
<template #general>
55+
<GeneralForm
56+
v-if="props.formConfig"
57+
:config="props.formConfig"
58+
@set-data="handleSetData"
59+
@form-updated="handleFormUpdated"
60+
>
61+
<template #before-fields>
62+
<slot name="before-form" />
63+
</template>
64+
<template #help-section>
65+
<slot name="help-section" />
66+
</template>
67+
<template #additional-button>
68+
<slot name="additional-button" />
69+
</template>
70+
<template #additional-fields>
71+
<slot name="additional-fields" />
72+
</template>
73+
</GeneralForm>
4974
</template>
50-
<template #help-section>
51-
<slot name="help-section" />
75+
<template #collaboration>
76+
<CollaborationTab :target-id="targetId" />
5277
</template>
53-
<template #additional-button>
54-
<slot name="additional-button" />
55-
</template>
56-
<template #additional-fields>
57-
<slot name="additional-fields" />
58-
</template>
59-
</GeneralForm>
78+
</Tabs>
6079
</template>
6180
</GeneralTemplate>
6281
</template>

src/core/integrations/integrations/integrations-show/containers/property-select-values/containers/mirakl-property-select-values/MiraklPropertySelectValues.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const emit = defineEmits(['pull-data']);
1616
const { t } = useI18n();
1717
1818
const searchConfig = computed(() => miraklPropertySelectValuesSearchConfigConstructor(t));
19-
const listingConfig = computed(() => miraklPropertySelectValuesListingConfigConstructor(t, props.id));
19+
const listingConfig = computed(() => miraklPropertySelectValuesListingConfigConstructor(t, props.id, props.salesChannelId));
2020
const fixedFilterVariables = computed(() => ({
2121
isPropertyValue: true,
2222
}));

src/core/integrations/integrations/integrations-show/containers/property-select-values/containers/mirakl-property-select-values/MiraklSelectValueEditProperty.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ const config: RemoteSelectValueEditPropertyConfig = {
5555
valueQuery: getMiraklPropertySelectValueQuery,
5656
valueDataKey: 'miraklPropertySelectValue',
5757
mapValueData: valueData => ({
58+
valueProxyId: valueData?.proxyId || null,
59+
salesChannelId: valueData?.salesChannel?.id || null,
5860
form: {
5961
remoteProperty: valueData?.remoteProperty?.name || '',
6062
boolValue: valueData?.boolValue ?? null,
@@ -182,8 +184,8 @@ const config: RemoteSelectValueEditPropertyConfig = {
182184
},
183185
},
184186
notMappedBanner: {
185-
titleKey: 'integrations.show.propertySelectValues.notMappedBanner.title',
186-
contentKey: 'integrations.show.propertySelectValues.notMappedBanner.content',
187+
titleKey: 'integrations.show.propertySelectValues.notMappedBannerMirakl.title',
188+
contentKey: 'integrations.show.propertySelectValues.notMappedBannerMirakl.content',
187189
linkPath: ctx => ({
188190
name: 'integrations.remoteProperties.edit',
189191
params: { type: ctx.type, id: ctx.propertyId! },
@@ -205,6 +207,15 @@ const config: RemoteSelectValueEditPropertyConfig = {
205207
},
206208
}
207209
: null,
210+
duplicateMapping: {
211+
titleKey: 'integrations.show.propertySelectValues.duplicate.mirakl.title',
212+
descriptionKey: 'integrations.show.propertySelectValues.duplicate.mirakl.description',
213+
promptKey: 'integrations.show.propertySelectValues.duplicate.mirakl.prompt',
214+
selectorHelpKey: 'integrations.show.propertySelectValues.duplicate.mirakl.help',
215+
submitLabelKey: 'integrations.show.propertySelectValues.duplicate.mirakl.submit',
216+
successMessageKey: 'integrations.show.propertySelectValues.duplicate.mirakl.success',
217+
isVisible: ctx => Boolean(ctx.salesChannelId && ctx.valueProxyId && ctx.localPropertyId),
218+
},
208219
listRoute: ctx => ({
209220
name: 'integrations.integrations.show',
210221
params: { type: ctx.type, id: ctx.integrationId },

src/core/integrations/integrations/integrations-show/containers/property-select-values/containers/mirakl-property-select-values/configs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const miraklPropertySelectValuesSearchConfigConstructor = (t: Function):
7777
export const miraklPropertySelectValuesListingConfigConstructor = (
7878
t: Function,
7979
specificIntegrationId: string,
80+
salesChannelId: string,
8081
): ListingConfig => ({
8182
headers: [
8283
t('integrations.show.propertySelectValues.labels.localizedValue'),
@@ -102,7 +103,7 @@ export const miraklPropertySelectValuesListingConfigConstructor = (
102103
addActions: true,
103104
addEdit: true,
104105
addShow: true,
105-
urlQueryParams: { integrationId: specificIntegrationId },
106+
urlQueryParams: { integrationId: specificIntegrationId, salesChannelId },
106107
editUrlName: 'integrations.remotePropertySelectValues.edit',
107108
showUrlName: 'integrations.remotePropertySelectValues.edit',
108109
addDelete: false,

0 commit comments

Comments
 (0)