Skip to content

Commit 5ed5e56

Browse files
committed
add more address fields to user form
update query key to cache selected fields if different from default
1 parent 126b0d6 commit 5ed5e56

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

src/components/CippComponents/CippFormUserSelector.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export const CippFormUserSelector = ({
3030
dataKey: "Results",
3131
labelField: (option) => `${option.displayName} (${option.userPrincipalName})`,
3232
valueField: valueField ? valueField : "id",
33-
queryKey: `ListUsers-${currentTenant?.value ? currentTenant.value : selectedTenant}`,
33+
queryKey: `ListUsers-${currentTenant?.value ? currentTenant.value : selectedTenant}-${
34+
select ? select : "default"
35+
}`,
3436
data: {
3537
Endpoint: "users",
3638
manualPagination: true,

src/components/CippFormPages/CippAddEditUser.jsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,26 +254,35 @@ const CippAddEditUser = (props) => {
254254
<CippFormComponent
255255
type="textField"
256256
fullWidth
257-
label="Postal Code"
258-
name="postalCode"
257+
label="City"
258+
name="city"
259259
formControl={formControl}
260260
/>
261261
</Grid>
262262
<Grid size={{ md: 6, xs: 12 }}>
263263
<CippFormComponent
264264
type="textField"
265265
fullWidth
266-
label="Country"
267-
name="country"
266+
label="State/Province"
267+
name="state"
268268
formControl={formControl}
269269
/>
270270
</Grid>
271271
<Grid size={{ md: 6, xs: 12 }}>
272272
<CippFormComponent
273273
type="textField"
274274
fullWidth
275-
label="City"
276-
name="city"
275+
label="Postal Code"
276+
name="postalCode"
277+
formControl={formControl}
278+
/>
279+
</Grid>
280+
<Grid size={{ md: 6, xs: 12 }}>
281+
<CippFormComponent
282+
type="textField"
283+
fullWidth
284+
label="Country"
285+
name="country"
277286
formControl={formControl}
278287
/>
279288
</Grid>

src/pages/identity/administration/users/add.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const Page = () => {
5656
label="Copy properties from another user"
5757
multiple={false}
5858
select={
59-
"id,userPrincipalName,displayName,givenName,surname,mailNickname,jobTitle,department,streetAddress,postalCode,companyName,mobilePhone,businessPhones,usageLocation,office"
59+
"id,userPrincipalName,displayName,givenName,surname,mailNickname,jobTitle,department,streetAddress,city,state,postalCode,companyName,mobilePhone,businessPhones,usageLocation,office"
6060
}
6161
addedField={{
6262
groupType: "calculatedGroupType",
@@ -69,6 +69,8 @@ const Page = () => {
6969
jobTitle: "jobTitle",
7070
department: "department",
7171
streetAddress: "streetAddress",
72+
city: "city",
73+
state: "state",
7274
postalCode: "postalCode",
7375
companyName: "companyName",
7476
mobilePhone: "mobilePhone",

0 commit comments

Comments
 (0)