Skip to content

Commit 78f990a

Browse files
shreeyash07frozenhelium
authored andcommitted
chore(changeset): update status for localunit and minor UI changes
1 parent 485eaea commit 78f990a

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

.changeset/blue-insects-show.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"go-web-app": patch
3+
---
4+
5+
Update local units UI
6+
7+
- Add icon for externally managed status
8+
- Relocate status column in local units table
9+
- Improve overall UI

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitView/index.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,14 @@ function LocalUnitView(props: Props) {
105105
emptyMessage={strings.localUnitViewNoChanges}
106106
contentViewType="grid"
107107
numPreferredGridContentColumns={3}
108-
footerContentClassName={styles.localUnitViewFooter}
109-
footerContent={(
110-
<DiffWrapper
111-
hideOnPristine
112-
diffViewEnabled
108+
withFooterBorder
109+
footerContent={isDefined(newValue?.update_reason_overview) && (
110+
<TextOutput
111+
valueClassName={styles.updateReasonText}
112+
strongLabel
113113
value={newValue?.update_reason_overview}
114-
previousValue={oldValue?.update_reason_overview}
115-
>
116-
<TextOutput
117-
strongValue
118-
value={newValue?.update_reason_overview}
119-
label={strings.localUnitViewUpdateReason}
120-
/>
121-
</DiffWrapper>
114+
label={strings.localUnitViewUpdateReason}
115+
/>
122116
)}
123117
>
124118
<SelectDiffWrapper
@@ -166,6 +160,7 @@ function LocalUnitView(props: Props) {
166160
label={strings.localUnitViewLatitude}
167161
value={newValue?.location_json?.lat}
168162
valueType="number"
163+
maximumFractionDigits={10}
169164
/>
170165
</DiffWrapper>
171166
<DiffWrapper
@@ -179,6 +174,7 @@ function LocalUnitView(props: Props) {
179174
label={strings.localUnitViewLongitude}
180175
value={newValue?.location_json?.lng}
181176
valueType="number"
177+
maximumFractionDigits={10}
182178
/>
183179
</DiffWrapper>
184180
<DiffWrapper
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.local-unit-view-footer {
2-
border-top: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
3-
padding-top: var(--go-ui-spacing-md);
1+
.update-reason-text {
42
font-style: italic;
53
}

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ function LocalUnitsForm(props: Props) {
456456

457457
return (
458458
<div className={styles.localUnitsForm}>
459-
{isDefined(actionsContainerRef.current) && (
459+
{isDefined(actionsContainerRef.current) && environment !== 'production' && (
460460
<Portal container={actionsContainerRef.current}>
461-
{isDefined(localUnitDetailsResponse) && environment !== 'production' && (
461+
{isDefined(localUnitDetailsResponse) && (
462462
<>
463463
{hasUpdatePermission && (
464464
<Button

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsTable/LocalUnitTableActions/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,12 @@ function LocalUnitsTableActions(props: Props) {
6666
isGuestUser,
6767
} = usePermissions();
6868

69-
const isLocked = (
70-
isDefined(status)
71-
&& !(status === VALIDATED)
72-
);
69+
const isLocked = status !== VALIDATED;
7370

74-
const isExternallyManaged = (status === EXTERNALLY_MANAGED
71+
const isExternallyManaged = status === EXTERNALLY_MANAGED
7572
|| (isDefined(localUnitType)
7673
&& isDefined(manageResponse)
77-
&& !!manageResponse[localUnitType]?.enabled));
74+
&& !!manageResponse[localUnitType]?.enabled);
7875

7976
const hasPermission = isAuthenticated
8077
&& !isExternallyManaged

translationMigrations/000047-1757587609420.json renamed to translationMigrations/000050-1758013961153.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"parent": "000046-1756436727466.json",
2+
"parent": "000049-1758005186095.json",
33
"actions": [
44
{
55
"action": "add",

0 commit comments

Comments
 (0)