-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3463 from JohnDuprey/dev
view user improvements
- Loading branch information
Showing
8 changed files
with
299 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material"; | ||
import { useState } from "react"; | ||
import dynamic from "next/dynamic"; // Import dynamic from next/dynamic | ||
import { CippPropertyList } from "./CippPropertyList"; // Import CippPropertyList | ||
import { LocationOn } from "@mui/icons-material"; | ||
|
||
const CippMap = dynamic(() => import("./CippMap"), { ssr: false }); // Dynamic import for CippMap | ||
|
||
export const CippLocationDialog = ({ location }) => { | ||
const [open, setOpen] = useState(false); | ||
|
||
const handleOpen = () => { | ||
setOpen(true); | ||
}; | ||
|
||
const handleClose = () => { | ||
setOpen(false); | ||
}; | ||
|
||
const markers = [ | ||
{ | ||
position: [location.geoCoordinates.latitude, location.geoCoordinates.longitude], | ||
popup: `${location.city}, ${location.state}, ${location.countryOrRegion}`, | ||
}, | ||
]; | ||
|
||
const properties = [ | ||
{ label: "City", value: location.city }, | ||
{ label: "State", value: location.state }, | ||
{ label: "Country/Region", value: location.countryOrRegion }, | ||
]; | ||
|
||
return ( | ||
<> | ||
<Button size="small" variant="outlined" onClick={handleOpen} startIcon={<LocationOn />}> | ||
Show Map | ||
</Button> | ||
<Dialog fullWidth maxWidth="sm" onClose={handleClose} open={open}> | ||
<DialogTitle>Location Details</DialogTitle> | ||
<DialogContent> | ||
<CippPropertyList propertyItems={properties} showDivider={false} /> | ||
<CippMap markers={markers} zoom={10} mapSx={{ height: "300px", width: "100%" }} /> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button color="inherit" onClick={handleClose}> | ||
Close | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"0": "Success", | ||
"50126": "Invalid username or password", | ||
"70044": "The session has expired or is invalid due to sign-in frequency checks by conditional access", | ||
"50089": "Flow token expired", | ||
"53003": "Access has been blocked by Conditional Access policies", | ||
"50140": "This error occurred due to 'Keep me signed in' interrupt when the user was signing-in", | ||
"50097": "Device authentication required", | ||
"65001": "Application X doesn't have permission to access application Y or the permission has been revoked", | ||
"50053": "Account is locked because user tried to sign in too many times with an incorrect user ID or password", | ||
"50020": "The user is unauthorized", | ||
"50125": "Sign-in was interrupted due to a password reset or password registration entry", | ||
"50074": "User did not pass the MFA challenge", | ||
"50133": "Session is invalid due to expiration or recent password change", | ||
"530002": "Your device is required to be compliant to access this resource", | ||
"9001011": "Device policy contains unsupported required device state" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.