Skip to content

Commit 718cde5

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 566bf6a commit 718cde5

7 files changed

Lines changed: 52 additions & 28 deletions

File tree

‎contentcuration/contentcuration/frontend/channelList/views/Organization/OrganizationDetailsTab.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
appearance="raised-button"
5353
primary
5454
class="save-button"
55-
:text="isNew ? organizationStrings.createOrganization$() : organizationStrings.saveChanges$()"
55+
:text="
56+
isNew ? organizationStrings.createOrganization$() : organizationStrings.saveChanges$()
57+
"
5658
:disabled="saving"
5759
@click="submit"
5860
/>

‎contentcuration/contentcuration/frontend/channelList/views/Organization/OrganizationEditPage.vue‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
>
77
<template #header>
88
<span class="notranslate">
9-
{{ isNew ? organizationStrings.newOrganizationTitle$() : organization ? organization.name : '' }}
9+
{{
10+
isNew
11+
? organizationStrings.newOrganizationTitle$()
12+
: organization
13+
? organization.name
14+
: ''
15+
}}
1016
</span>
1117
</template>
1218

‎contentcuration/contentcuration/frontend/channelList/views/Organization/OrganizationInvitation.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
</div>
2020
<div class="invitation__main--right__btn-two">
2121
<KIconButton
22-
:tooltip="organizationStrings.declineTooltip$({ organization: invitation.organization_name })"
22+
:tooltip="
23+
organizationStrings.declineTooltip$({ organization: invitation.organization_name })
24+
"
2325
:primary="true"
2426
icon="close"
2527
:color="$themePalette.red.v_500"

‎contentcuration/contentcuration/frontend/channelList/views/Organization/StudioMyOrganizations.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
import { useOrganizationList } from '../../composables/useOrganizationList';
7878
import { useOrganizationInvitations } from '../../composables/useOrganizationInvitations';
7979
import { getApiErrorMessage } from '../../utils';
80-
import { organizationStrings } from 'shared/strings/organizationStrings';
8180
import OrganizationCard from './OrganizationCard.vue';
8281
import OrganizationInvitation from './OrganizationInvitation.vue';
82+
import { organizationStrings } from 'shared/strings/organizationStrings';
8383
import StudioRaisedBox from 'shared/views/StudioRaisedBox';
8484
import useSnackbar from 'shared/composables/useSnackbar';
8585

‎contentcuration/contentcuration/frontend/channelList/views/Organization/__tests__/OrganizationEditPage.spec.js‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const createRouter = initialPath => {
5555

5656
describe('OrganizationEditPage', () => {
5757
beforeEach(() => {
58-
jest.spyOn(Organization, 'fetchModel').mockResolvedValue({ id: 'org-1', name: 'Acme', description: '' });
58+
jest
59+
.spyOn(Organization, 'fetchModel')
60+
.mockResolvedValue({ id: 'org-1', name: 'Acme', description: '' });
5961
});
6062

6163
afterEach(() => {
@@ -105,7 +107,9 @@ describe('OrganizationEditPage', () => {
105107
});
106108

107109
it("navigates to the new organization's edit page after creating it, with no Sharing tab while creating", async () => {
108-
jest.spyOn(Organization, 'create').mockResolvedValue({ id: 'org-2', name: 'New Org', description: '' });
110+
jest
111+
.spyOn(Organization, 'create')
112+
.mockResolvedValue({ id: 'org-2', name: 'New Org', description: '' });
109113
const router = createRouter('/organization/new');
110114
render(OrganizationEditPage, {
111115
localVue,
@@ -114,7 +118,9 @@ describe('OrganizationEditPage', () => {
114118
props: {},
115119
});
116120

117-
expect(screen.queryByRole('tab', { name: organizationStrings.sharingTab$() })).not.toBeInTheDocument();
121+
expect(
122+
screen.queryByRole('tab', { name: organizationStrings.sharingTab$() }),
123+
).not.toBeInTheDocument();
118124

119125
const user = userEvent.setup();
120126
await user.type(screen.getByRole('textbox', { name: 'Organization name' }), 'New Org');

‎contentcuration/contentcuration/frontend/channelList/views/Organization/__tests__/StudioMyOrganizations.spec.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ describe('StudioMyOrganizations', () => {
106106

107107
expect((await screen.findAllByText('Org One')).length).toBeGreaterThan(0);
108108
expect(fetchCollection).toHaveBeenCalledTimes(2);
109-
expect(
110-
screen.queryByText(organizationStrings.noOrganizationsFound$()),
111-
).not.toBeInTheDocument();
109+
expect(screen.queryByText(organizationStrings.noOrganizationsFound$())).not.toBeInTheDocument();
112110
});
113111
});

‎contentcuration/contentcuration/frontend/shared/strings/organizationStrings.js‎

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
3131
},
3232
moreOptions: {
3333
message: 'More options for {name}',
34-
context: 'Accessible label for the options button on an organization card, naming the organization',
34+
context:
35+
'Accessible label for the options button on an organization card, naming the organization',
3536
},
3637
editOrganization: {
3738
message: 'Edit organization',
@@ -55,7 +56,8 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
5556
},
5657
adminAccessRequiredForEdits: {
5758
message: 'Only organization admins can edit these details.',
58-
context: 'Notice shown to non-admin members viewing an organization\'s details in read-only mode',
59+
context:
60+
"Notice shown to non-admin members viewing an organization's details in read-only mode",
5961
},
6062
saveChanges: {
6163
message: 'Save changes',
@@ -123,7 +125,8 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
123125
},
124126
decliningInvitationMessage: {
125127
message: 'Are you sure you want to decline this invitation?',
126-
context: 'Body text for the confirmation dialog shown when declining an organization invitation',
128+
context:
129+
'Body text for the confirmation dialog shown when declining an organization invitation',
127130
},
128131
notAdmin: {
129132
message: 'Only organization admins can manage sharing settings.',
@@ -135,23 +138,24 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
135138
},
136139
name: {
137140
message: 'Name',
138-
context: 'Column header for a member\'s name in the organization members table',
141+
context: "Column header for a member's name in the organization members table",
139142
},
140143
email: {
141144
message: 'Email',
142-
context: 'Column header for a member\'s email in the organization members table',
145+
context: "Column header for a member's email in the organization members table",
143146
},
144147
role: {
145148
message: 'Role',
146-
context: 'Column header for a member\'s role in the organization members table',
149+
context: "Column header for a member's role in the organization members table",
147150
},
148151
options: {
149152
message: 'Options',
150153
context: 'Column header for the row actions menu in the organization members table',
151154
},
152155
optionsFor: {
153156
message: 'Options for {email}',
154-
context: 'Accessible label for a row\'s options button in the organization members table, naming the member\'s email',
157+
context:
158+
"Accessible label for a row's options button in the organization members table, naming the member's email",
155159
},
156160
resendInvitation: {
157161
message: 'Resend invitation',
@@ -163,15 +167,15 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
163167
},
164168
makeViewer: {
165169
message: 'Make viewer',
166-
context: 'Label for the menu option that changes a member\'s role to viewer',
170+
context: "Label for the menu option that changes a member's role to viewer",
167171
},
168172
makeEditor: {
169173
message: 'Make editor',
170-
context: 'Label for the menu option that changes a member\'s role to editor',
174+
context: "Label for the menu option that changes a member's role to editor",
171175
},
172176
makeAdmin: {
173177
message: 'Make admin',
174-
context: 'Label for the menu option that changes a member\'s role to admin',
178+
context: "Label for the menu option that changes a member's role to admin",
175179
},
176180
closeRole: {
177181
message: 'Remove from organization',
@@ -191,27 +195,31 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
191195
},
192196
genericMembershipError: {
193197
message: 'Unable to update this member',
194-
context: 'Fallback error message shown when a membership action fails without a specific server message',
198+
context:
199+
'Fallback error message shown when a membership action fails without a specific server message',
195200
},
196201
closeRoleTitle: {
197202
message: 'Remove from organization',
198203
context: 'Title for the confirmation dialog shown when removing a member from the organization',
199204
},
200205
closeRoleText: {
201206
message: 'Are you sure you want to remove {email} from this organization?',
202-
context: 'Body text for the confirmation dialog shown when removing a member from the organization',
207+
context:
208+
'Body text for the confirmation dialog shown when removing a member from the organization',
203209
},
204210
closeRoleConfirm: {
205211
message: 'Remove',
206212
context: 'Label for the button that confirms removing a member from the organization',
207213
},
208214
revokeInvitationTitle: {
209215
message: 'Revoke invitation',
210-
context: 'Title for the confirmation dialog shown when revoking a pending organization invitation',
216+
context:
217+
'Title for the confirmation dialog shown when revoking a pending organization invitation',
211218
},
212219
revokeInvitationText: {
213220
message: 'Are you sure you want to revoke the invitation for {email}?',
214-
context: 'Body text for the confirmation dialog shown when revoking a pending organization invitation',
221+
context:
222+
'Body text for the confirmation dialog shown when revoking a pending organization invitation',
215223
},
216224
revokeInvitationConfirm: {
217225
message: 'Revoke',
@@ -227,7 +235,7 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
227235
},
228236
emailRequired: {
229237
message: 'Email is required',
230-
context: 'Validation message shown when the invite form\'s email field is left blank',
238+
context: "Validation message shown when the invite form's email field is left blank",
231239
},
232240
roleLabel: {
233241
message: 'Role type',
@@ -251,18 +259,20 @@ export const organizationStrings = createTranslator('OrganizationStrings', {
251259
},
252260
newOrganization: {
253261
message: 'New organization',
254-
context: 'Label for the button on the My Organizations page that starts creating a new organization',
262+
context:
263+
'Label for the button on the My Organizations page that starts creating a new organization',
255264
},
256265
noOrganizationsFound: {
257266
message: 'You are not a member of any organizations yet.',
258267
context: 'Message shown on the My Organizations page when the user belongs to no organizations',
259268
},
260269
invitations: {
261270
message: 'You have {count, plural,\n =1 {# invitation}\n other {# invitations}}',
262-
context: 'Header for the banner listing the user\'s pending organization invitations',
271+
context: "Header for the banner listing the user's pending organization invitations",
263272
},
264273
invitationActionError: {
265274
message: 'Unable to complete this action',
266-
context: 'Fallback error message shown when accepting or declining an organization invitation fails',
275+
context:
276+
'Fallback error message shown when accepting or declining an organization invitation fails',
267277
},
268278
});

0 commit comments

Comments
 (0)