Migrate schema to service ids
This commit is contained in:
parent
71958f8a01
commit
8b0da36caa
258 changed files with 4795 additions and 2613 deletions
|
@ -310,7 +310,9 @@ function ContactSection({
|
|||
}
|
||||
|
||||
const { distributionId } = section.story;
|
||||
const uuids = section.contacts.map(contact => contact.uuid).filter(isNotNil);
|
||||
const serviceIds = section.contacts
|
||||
.map(contact => contact.serviceId)
|
||||
.filter(isNotNil);
|
||||
const sectionName =
|
||||
distributionId === MY_STORY_ID
|
||||
? i18n('icu:Stories__mine')
|
||||
|
@ -322,17 +324,17 @@ function ContactSection({
|
|||
<div className="module-SafetyNumberChangeDialog__row__story-name">
|
||||
{sectionName}
|
||||
</div>
|
||||
{distributionId && removeFromStory && uuids.length > 1 && (
|
||||
{distributionId && removeFromStory && serviceIds.length > 1 && (
|
||||
<SectionButtonWithMenu
|
||||
ariaLabel={i18n('icu:safetyNumberChangeDialog__actions-story', {
|
||||
story: sectionName,
|
||||
})}
|
||||
i18n={i18n}
|
||||
memberCount={uuids.length}
|
||||
memberCount={serviceIds.length}
|
||||
storyName={sectionName}
|
||||
theme={theme}
|
||||
removeFromStory={() => {
|
||||
removeFromStory(distributionId, uuids);
|
||||
removeFromStory(distributionId, serviceIds);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
@ -443,7 +445,7 @@ function ContactRow({
|
|||
shouldShowNumber: boolean;
|
||||
theme: ThemeType;
|
||||
}>) {
|
||||
const { uuid } = contact;
|
||||
const { serviceId } = contact;
|
||||
|
||||
return (
|
||||
<li className="module-SafetyNumberChangeDialog__row" key={contact.id}>
|
||||
|
@ -493,14 +495,14 @@ function ContactRow({
|
|||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{distributionId && removeFromStory && uuid ? (
|
||||
{distributionId && removeFromStory && serviceId ? (
|
||||
<RowButtonWithMenu
|
||||
ariaLabel={i18n('icu:safetyNumberChangeDialog__actions-contact', {
|
||||
contact: contact.title,
|
||||
})}
|
||||
i18n={i18n}
|
||||
theme={theme}
|
||||
removeFromStory={() => removeFromStory(distributionId, [uuid])}
|
||||
removeFromStory={() => removeFromStory(distributionId, [serviceId])}
|
||||
verifyContact={() => setSelectedContact(contact)}
|
||||
/>
|
||||
) : (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue