Skip to content

Commit 6f8c1aa

Browse files
authored
fix: No Sufficient Permissions message should be a part of Punchout chunk (CXSPA-10255) (#20390)
1 parent 92997b9 commit 6f8c1aa

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

integration-libs/punchout/assets/translations/en/punchout.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"redirectToProcurementSystem": "Return to Procurement System",
66
"closeSession": "Close Session",
77
"initiatingUserSession": "Initiating user session",
8-
"error": "The session has unexpectedly ended. Please return to the procurement system."
8+
"error": "The session has unexpectedly ended. Please return to the procurement system.",
9+
"noSufficientPermissions": "No sufficient permissions to access this page"
910
}
1011
}

integration-libs/punchout/core/facade/punchout.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ describe('Punchoutservice', () => {
330330
complete: () => {
331331
expect(globalMessageService.add).not.toHaveBeenCalledWith(
332332
{
333-
key: 'organization.notification.noSufficientPermissions',
333+
key: 'punchout.noSufficientPermissions',
334334
},
335335
GlobalMessageType.MSG_TYPE_WARNING
336336
);
@@ -357,7 +357,7 @@ describe('Punchoutservice', () => {
357357
complete: () => {
358358
expect(globalMessageService.add).toHaveBeenCalledWith(
359359
{
360-
key: 'organization.notification.noSufficientPermissions',
360+
key: 'punchout.noSufficientPermissions',
361361
},
362362
GlobalMessageType.MSG_TYPE_WARNING
363363
);

integration-libs/punchout/core/facade/punchout.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class PunchoutService implements PunchoutFacade {
139139
) {
140140
this.globalMessageService.add(
141141
{
142-
key: 'organization.notification.noSufficientPermissions',
142+
key: 'punchout.noSufficientPermissions',
143143
},
144144
GlobalMessageType.MSG_TYPE_WARNING
145145
);

integration-libs/punchout/root/guards/punchout-navigation.guard.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('PunchoutNavigationGuard', () => {
127127
guard.canActivate(mockRoute, {} as any).subscribe((result) => {
128128
expect(result).toBeFalsy();
129129
expect(globalMessageService.add).toHaveBeenCalledWith(
130-
{ key: 'organization.notification.noSufficientPermissions' },
130+
{ key: 'punchout.noSufficientPermissions' },
131131
GlobalMessageType.MSG_TYPE_WARNING
132132
);
133133
expect(routingService.go).toHaveBeenCalledWith({

integration-libs/punchout/root/guards/punchout-navigation.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class PunchoutNavigationGuard {
131131
protected handleWarning() {
132132
this.globalMessageService.add(
133133
{
134-
key: 'organization.notification.noSufficientPermissions',
134+
key: 'punchout.noSufficientPermissions',
135135
},
136136
GlobalMessageType.MSG_TYPE_WARNING
137137
);

0 commit comments

Comments
 (0)