Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #971 from open-apparel-registry/tw/rename-parent-c…
Browse files Browse the repository at this point in the history
…ompany

Update parent company label
  • Loading branch information
TaiWilkin committed Mar 5, 2020
2 parents e27b493 + fefb737 commit 1afbd9d
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Ignore case for forgot-password email [#970] [https://github.com/open-apparel-registry/open-apparel-registry/pull/970]

- Update 'parent company' label to 'parent company / supplier group' [#971] (https://github.com/open-apparel-registry/open-apparel-registry/pull/971)

### Security

## [2.22.0] - 2020-02-20
Expand Down
2 changes: 1 addition & 1 deletion src/app/src/actions/claimFacility.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function fetchParentCompanyOptions() {
.then(data => dispatch(completeFetchParentCompanyOptions(data)))
.catch(err => dispatch(logErrorAndDispatchFailure(
err,
'An error prevented fetching parent company options',
'An error prevented fetching parent company / supplier group options',
failFetchParentCompanyOptions,
)));
};
Expand Down
3 changes: 2 additions & 1 deletion src/app/src/components/ClaimFacilityIntroStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default function ClaimFacilityIntroStep() {
</ListItemIcon>
<ListItemText>
<Typography variant="headline">
Add information about your head office and parent company
Add information about your head office
and parent company / supplier group
</Typography>
</ListItemText>
</ListItem>
Expand Down
4 changes: 2 additions & 2 deletions src/app/src/components/ClaimedFacilitiesDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function ClaimedFacilitiesDetails({
/>
<ShowOnly when={!isEmpty(contributorOptions)}>
<InputSection
label="Parent Company"
label="Parent Company / Supplier Group"
aside={parentCompanyAside}
value={get(data, 'facility_parent_company.id', null)}
onChange={updateParentCompany}
Expand All @@ -426,7 +426,7 @@ function ClaimedFacilitiesDetails({
</ShowOnly>
<ShowOnly when={!contributorOptions}>
<Typography>
Parent Company
Parent Company / Supplier Group
</Typography>
<Typography>
{get(data, 'facility_parent_company.name', null)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/src/components/DashboardClaimsDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function DashboardClaimsDetails({
}
/>
<InfoSection
label="Facility Parent Company"
label="Facility Parent Company / Supplier Group"
value={
(() => {
const parentCompanyName = get(data, 'facility_parent_company.name', null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function FacilityDetailsSidebarClaimedInfo({
value={facility.address}
/>
<ClaimInfoSection
label="Parent Company"
label="Parent Company / Supplier Group"
value={
facility.parent_company
? (
Expand Down
7 changes: 4 additions & 3 deletions src/app/src/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,10 @@ export const claimAFacilityFormFields = Object.freeze({
}),
parentCompany: Object.freeze({
id: 'parent-company',
label: 'Parent company',
aside: `If you cannot find the parent company in this list consider
inviting them to register with the Open Apparel Registry.`,
label: 'Parent company / supplier group',
aside: `If you cannot find the parent company / supplier group
in this list consider inviting them to register with the Open Apparel
Registry.`,
}),
website: Object.freeze({
id: 'website',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.2.10 on 2020-03-04 14:10

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('api', '0042_add_can_view_full_contrib_detail_flag'),
]

operations = [
migrations.AlterField(
model_name='facilityclaim',
name='parent_company',
field=models.ForeignKey(default=None, help_text='The parent company / supplier group of this facility claim.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='parent_company', to='api.Contributor', verbose_name='parent company / supplier group'),
),
migrations.AlterField(
model_name='historicalfacilityclaim',
name='parent_company',
field=models.ForeignKey(blank=True, db_constraint=False, default=None, help_text='The parent company / supplier group of this facility claim.', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Contributor', verbose_name='parent company / supplier group'),
),
]
5 changes: 3 additions & 2 deletions src/django/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,9 @@ class FacilityClaim(models.Model):
null=True,
default=None,
on_delete=models.PROTECT,
verbose_name='parent company',
help_text='The parent company of this facility claim.')
verbose_name='parent company / supplier group',
help_text='The parent company / supplier group of this '
'facility claim.')

created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Expand Down

0 comments on commit 1afbd9d

Please sign in to comment.