Skip to content

Commit

Permalink
fix: title table
Browse files Browse the repository at this point in the history
  • Loading branch information
soridalac committed Oct 22, 2024
1 parent e8f9ac5 commit 30479af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/baseCommands/user/permset/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export abstract class UserPermSetAssignBaseCommand extends SfCommand<PermsetAssi

private print(): void {
if (this.failures.length > 0 && this.successes.length > 0) {
this.styledHeader('Partial Success');
this.styledHeader('Permsets Assigned');
this.styledHeader('Partial Success');
this.table({
data: this.successes,
columns: [
Expand All @@ -94,31 +94,31 @@ export abstract class UserPermSetAssignBaseCommand extends SfCommand<PermsetAssi
],
});
this.log('');
this.styledHeader('Failures');
this.table({
data: this.failures,
columns: [
{ key: 'name', name: 'Username' },
{ key: 'message', name: 'Error Message' },
],
title: 'Failures',
});
} else if (this.successes.length > 0) {
this.styledHeader('Permsets Assigned');
this.table({
data: this.successes,
columns: [
{ key: 'name', name: 'Username' },
{ key: 'value', name: 'Permission Set Assignment' },
],
title: 'Permsets Assigned',
});
} else if (this.failures.length > 0) {
this.styledHeader('Failures');
this.table({
data: this.failures,
columns: [
{ key: 'name', name: 'Username' },
{ key: 'message', name: 'Error Message' },
],
title: 'Failures',
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/baseCommands/user/permsetlicense/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,27 @@ export const print = (results: PSLResult): void => {
ux.styledHeader('Partial Success');
}
if (results.successes.length > 0) {
ux.styledHeader('Permset Licenses Assigned');
ux.table({
data: results.successes,
columns: [
{ key: 'name', name: 'Username' },
{ key: 'value', name: 'Permission Set License Assignment' },
],
title: 'Permset Licenses Assigned',
});
}

if (results.failures.length > 0) {
if (results.successes.length > 0) {
ux.log('');
}
ux.styledHeader('Failures');
ux.table({
data: results.failures,
columns: [
{ key: 'name', name: 'Username' },
{ key: 'message', name: 'Error Message' },
],
title: 'Failures',
});
}
};
Expand Down

0 comments on commit 30479af

Please sign in to comment.