Skip to content

Commit 6e724c5

Browse files
author
Ben White
committed
Updated Frontend implementation to use FeedGeneratorId instead of FeedType
1 parent fbeafa5 commit 6e724c5

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/Umbraco.Commerce.ProductFeeds.Client/frontend/src/generated/apis/types.gen.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export type NotificationHeaderModel = {
1515

1616
export type ProductFeedSettingReadModel = {
1717
id: string;
18-
feedType: ProductFeedType;
19-
readonly feedTypeName: string;
18+
feedGeneratorId: string;
2019
feedName: string;
2120
feedDescription: string;
2221
storeId: string;
@@ -31,7 +30,7 @@ export type ProductFeedSettingReadModel = {
3130
export type ProductFeedSettingWriteModel = {
3231
id?: (string) | null;
3332
feedRelativePath: string;
34-
feedType: ProductFeedType;
33+
feedGeneratorId: string;
3534
feedName: string;
3635
feedDescription: string;
3736
storeId: string;
@@ -42,8 +41,6 @@ export type ProductFeedSettingWriteModel = {
4241
includeTaxInPrice: boolean;
4342
};
4443

45-
export type ProductFeedType = 'GoogleMerchantCenter';
46-
4744
export type PropertyAndNodeMapItem = {
4845
propertyAlias: string;
4946
nodeName: string;

src/Umbraco.Commerce.ProductFeeds.Client/frontend/src/workspaces/details/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export type FeProductFeedSettingWriteModel = Omit<ProductFeedSettingWriteModel,
44
id?: string
55
propertyNameMappings: Array<FePropertyAndNodeMapDetails>
66
productRootId?: string,
7-
feedType?: 'GoogleMerchantCenter'
7+
feedGeneratorId?: string
88
}
99

1010
export type FePropertyAndNodeMapDetails = PropertyAndNodeMapItem & {
1111
uiId: string
12-
}
12+
}

src/Umbraco.Commerce.ProductFeeds.Client/frontend/src/workspaces/details/views/details.element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ export class UcpfDetailsWorkspaceViewElement
5757

5858
this.observe(this.#workspaceContext.model, (model) => {
5959
this._model = model;
60-
this._feedTypes = this.#markSelectedOption(this._feedTypes, model!.feedType);
60+
this._feedTypes = this.#markSelectedOption(this._feedTypes, model!.feedGeneratorId);
6161
});
6262

6363
this.observe(this.#workspaceContext.feedTypeOptions, (feedTypes) => {
64-
this._feedTypes = this.#markSelectedOption(feedTypes, this._model?.feedType);
64+
this._feedTypes = this.#markSelectedOption(feedTypes, this._model?.feedGeneratorId);
6565
});
6666

6767
this.observe(this.#workspaceContext.propertyValueExtractorOptions, (options) => {
@@ -188,7 +188,7 @@ export class UcpfDetailsWorkspaceViewElement
188188
label=${this.localize.term('ucProductFeeds_propFeedTypeLabel')}
189189
placeholder=${`-- ${this.localize.term('ucPlaceholders_selectAnItem')} --`}
190190
slot='editor'
191-
name='feedType'
191+
name='feedGeneratorId'
192192
.options=${this._feedTypes}
193193
@change=${this.#onSelectElementChange}>
194194
</uui-select>

0 commit comments

Comments
 (0)