@capillarytech/creatives-library 7.17.163 → 7.17.164-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -140,6 +140,20 @@ export class NavigationBar extends React.Component {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
+
productSelection = () => {
|
|
144
|
+
const { location, intl: { formatMessage } } = this.props;
|
|
145
|
+
const { pathname } = location;
|
|
146
|
+
const parentModule = pathname.substring(pathname.lastIndexOf('/') + 1);
|
|
147
|
+
console.log("parent module in product selection", parentModule);
|
|
148
|
+
switch (parentModule) {
|
|
149
|
+
case LOYALTY:
|
|
150
|
+
return formatMessage(messages.loyaltyProgram);
|
|
151
|
+
default:
|
|
152
|
+
return formatMessage(messages.selectedProductDefault)
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
143
157
|
render() {
|
|
144
158
|
const {
|
|
145
159
|
topbarMenuData,
|
|
@@ -178,7 +192,7 @@ export class NavigationBar extends React.Component {
|
|
|
178
192
|
topbarIcons={topbarIcons}
|
|
179
193
|
sidebarMenuData={[]}
|
|
180
194
|
sidebarMenuItemsPosition={null}
|
|
181
|
-
defaultSelectedProduct={
|
|
195
|
+
defaultSelectedProduct={this.productSelection()}
|
|
182
196
|
skipStateForStorage
|
|
183
197
|
selectOrganization={intl.formatMessage(messages.selectOrganization)}
|
|
184
198
|
isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled}
|
|
@@ -199,6 +213,7 @@ export class NavigationBar extends React.Component {
|
|
|
199
213
|
</CapWrapper>
|
|
200
214
|
</div>
|
|
201
215
|
</CapNavigation>
|
|
216
|
+
|
|
202
217
|
);
|
|
203
218
|
}
|
|
204
219
|
}
|
|
@@ -20,12 +20,11 @@ export const getLoyaltyTopbarMenuDataValue = () => [
|
|
|
20
20
|
link: 'loyalty/ui/',
|
|
21
21
|
key: 'programs',
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// },
|
|
23
|
+
{
|
|
24
|
+
label: <FormattedMessage {...globalMessages.promotions} />,
|
|
25
|
+
link: 'loyalty/ui/promotions/',
|
|
26
|
+
key: 'promotions',
|
|
27
|
+
},
|
|
29
28
|
{
|
|
30
29
|
label: <FormattedMessage {...globalMessages.creatives} />,
|
|
31
30
|
link: '/creatives/ui/v2/loyalty',
|