Skip to content

Commit 5335210

Browse files
author
Ben White
committed
Updated Frontend implementation to use FeedGeneratorId instead of FeedType
1 parent 0f2ab63 commit 5335210

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 ProductFeedSettingReadModelReadable = {
1717
id: string;
18-
feedType: ProductFeedType;
19-
readonly feedTypeName: string;
18+
feedGeneratorId: string;
2019
feedName: string;
2120
feedDescription: string;
2221
storeId: string;
@@ -45,7 +44,7 @@ export type ProductFeedSettingReadModelWritable = {
4544
export type ProductFeedSettingWriteModel = {
4645
id?: string | null;
4746
feedRelativePath: string;
48-
feedType: ProductFeedType;
47+
feedGeneratorId: string;
4948
feedName: string;
5049
feedDescription: string;
5150
storeId: string;
@@ -56,8 +55,6 @@ export type ProductFeedSettingWriteModel = {
5655
includeTaxInPrice: boolean;
5756
};
5857

59-
export type ProductFeedType = 'GoogleMerchantCenter';
60-
6158
export type PropertyAndNodeMapItem = {
6259
propertyAlias: string;
6360
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)