Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarfraz Alam committed Oct 15, 2023
1 parent ee6ca7d commit 55548e0
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 174 deletions.
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,55 +89,57 @@ You should fill in these values in their relevant fields in the `.env` file.

### Firebase Emulator Setup


1. Refer this site [https://firebase.google.com/docs/emulator-suite/install_and_configure]
2. Make sure you have the correct jdk version installed
3. Make sure you are in the parent directory
4. Now lets connect your local firebase to cloub by running command (```firebase login```)
4. Now lets connect your local firebase to cloub by running command (`firebase login`)
5. Then authenticate your firebase using browser and set the selected web app for codelabz
6. Then run the command (```firebase init```)
6. Then run the command (`firebase init`)
7. Select all the emulator necessitites by pressing a or selecting them manually and pressing space
8. Answer the commands
9. Lets set up your credentials of test data
10. Run your firebase emulator by running the following command.

``` shell
```shell
make emulator

```

11. If make command isn't installed then run command
``` shell

```shell
firebase emulators:start --import=testdata

```


12. If you want to start without any testdata , use the following command
``` shell

```shell
make emulator

```

14.If make command isn't installed then run
``` shell

```shell
firebase emulator:start
```
You will observe 3 terminals opening

You will observe 3 terminals opening

### Run Firebase Emulator

Run your firebase emulator by running the following command.

``` shell
```shell
make emulator-import
```

This will run the emulator with the `testdata`. Check out [TESTDATA.md](./TESTDATA.md) for more info.

if you don't want to import testdata, run

```
```
make emulator
```

Expand Down
279 changes: 141 additions & 138 deletions src/components/Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,144 +333,147 @@ const Dashboard = ({ background = "white", textColor = "black" }) => {

<Divider />

<Box m={3}>
<TextField
error={nameValidateError}
label="User Name"
variant="outlined"
placeholder={displayName || "User Name"}
value={name}
onChange={(event) => onChangeName(event.target.value)}
helperText={
nameValidateError ? nameValidateErrorMessage : null
}
fullWidth
autoComplete="handle"
required
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid": "userName",
startAdornment: (
<InputAdornment position="start">
<PersonIcon style={{ color: "rgba(0,0,0,.25)" }} />
</InputAdornment>
),
}}
/>
<TextField
error={handleValidateError}
label="User Handle"
variant="outlined"
placeholder="User Handle"
value={handle}
onChange={(event) => onChangeHandle(event.target.value)}
helperText={
handleValidateError ? handleValidateErrorMessage : null
}
fullWidth
autoComplete="handle"
required
onFocus={onFocusHandle}
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid":"userHandle",
startAdornment: (
<InputAdornment position="start">
<PersonOutlineIcon
style={{ color: "rgba(0,0,0,.25)" }}
/>
</InputAdornment>
),
}}
/>
<div width="100%">
<TextField
error={countryValidateError}
label="User Country"
variant="outlined"
placeholder="User Country"
value={country}
onChange={(e) => {
setCountry(e.target.value);
setCountrySearch(e.target.value);
}}
onFocus={() => {
setCountrySearch(country);
onFocusHandle();
}}
fullWidth
autoComplete="country"
required
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid":"userCountry",
startAdornment: (
<InputAdornment position="start">
<PersonOutlineIcon
style={{ color: "rgba(0,0,0,.25)" }}
/>
</InputAdornment>
),
}}
/>
<div>
{filteredData.length !== 0 && (
<div className="dataOutput">
{filteredData.map((item) => {
return (
<div
onClick={(e) => {
setCountry(item.name);
setCountrySearch("");
}}
style={{ color: textColor }}>
<span>{item.name}</span>
</div>
);
})}
</div>
)}
</div>
</div>
</Box>
<Divider></Divider>
<Box m={3}>
<Button
data-testid="createOrgBtn"
size="small"
fullWidth
variant="contained"
color="primary"
disableElevation
onClick={() => setShowOrgForm(!showOrgForm)}>
{showOrgForm === false
? "I want to create an organization"
: showOrgForm === true
? "I don't want to create an organization"
: "I want to create an organization"}
</Button>
</Box>
</Card>
</Grid>
{/* col-pad-24 pr-12 pt-8 pb-24 div-transition */}
<Grid
xs={showOrgForm ? 12 : null}
md={showOrgForm ? 6 : null}
style={{ paddingLeft: "24px" }}
className="pr-12 pr-12 pt-8 div-transition"
onFocus={() => setFocusLeft(false)}
item={true}>
{showOrgForm && (
<Card className="auth-form-col" style={{ margin: "0 auto" }}>
<Box mt={2} mb={2} m={3}>
<Typography>
<Box fontSize={16} fontWeight="fontWeightBold" m={1}>
<p className="mb-0 " style={{ color: textColor }}>
Organization Details
</p>
</Box>
</Typography>
</Box>
<Box m={3}>
<TextField
error={nameValidateError}
label="User Name"
variant="outlined"
placeholder={displayName || "User Name"}
value={name}
onChange={event => onChangeName(event.target.value)}
helperText={
nameValidateError ? nameValidateErrorMessage : null
}
fullWidth
autoComplete="handle"
required
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid": "userName",
startAdornment: (
<InputAdornment position="start">
<PersonIcon style={{ color: "rgba(0,0,0,.25)" }} />
</InputAdornment>
)
}}
/>
<TextField
error={handleValidateError}
label="User Handle"
variant="outlined"
placeholder="User Handle"
value={handle}
onChange={event => onChangeHandle(event.target.value)}
helperText={
handleValidateError ? handleValidateErrorMessage : null
}
fullWidth
autoComplete="handle"
required
onFocus={onFocusHandle}
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid": "userHandle",
startAdornment: (
<InputAdornment position="start">
<PersonOutlineIcon
style={{ color: "rgba(0,0,0,.25)" }}
/>
</InputAdornment>
)
}}
/>
<div width="100%">
<TextField
error={countryValidateError}
label="User Country"
variant="outlined"
placeholder="User Country"
value={country}
onChange={e => {
setCountry(e.target.value);
setCountrySearch(e.target.value);
}}
onFocus={() => {
setCountrySearch(country);
onFocusHandle();
}}
fullWidth
autoComplete="country"
required
style={{ marginBottom: "15px" }}
InputProps={{
"data-testid": "userCountry",
startAdornment: (
<InputAdornment position="start">
<PersonOutlineIcon
style={{ color: "rgba(0,0,0,.25)" }}
/>
</InputAdornment>
)
}}
/>
<div>
{filteredData.length !== 0 && (
<div className="dataOutput">
{filteredData.map(item => {
return (
<div
onClick={e => {
setCountry(item.name);
setCountrySearch("");
}}
style={{ color: textColor }}
>
<span>{item.name}</span>
</div>
);
})}
</div>
)}
</div>
</div>
</Box>
<Divider></Divider>
<Box m={3}>
<Button
data-testid="createOrgBtn"
size="small"
fullWidth
variant="contained"
color="primary"
disableElevation
onClick={() => setShowOrgForm(!showOrgForm)}
>
{showOrgForm === false
? "I want to create an organization"
: showOrgForm === true
? "I don't want to create an organization"
: "I want to create an organization"}
</Button>
</Box>
</Card>
</Grid>
{/* col-pad-24 pr-12 pt-8 pb-24 div-transition */}
<Grid
xs={showOrgForm ? 12 : null}
md={showOrgForm ? 6 : null}
style={{ paddingLeft: "24px" }}
className="pr-12 pr-12 pt-8 div-transition"
onFocus={() => setFocusLeft(false)}
item={true}
>
{showOrgForm && (
<Card className="auth-form-col" style={{ margin: "0 auto" }}>
<Box mt={2} mb={2} m={3}>
<Typography>
<Box fontSize={16} fontWeight="fontWeightBold" m={1}>
<p className="mb-0 " style={{ color: textColor }}>
Organization Details
</p>
</Box>
</Typography>
</Box>

<Divider />

Expand Down
4 changes: 2 additions & 2 deletions src/components/NavBar/new/MainNavbar/RightMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const RightMenu = ({ mode, onClick }) => {
: "#3AAFA9",
marginLeft: "1rem",
marginBottom: ".2rem",
cursor:"pointer",
cursor: "pointer"
}}
size={mode === "inline" ? "default" : "medium"}
src={profile.photoURL}
Expand All @@ -261,7 +261,7 @@ const RightMenu = ({ mode, onClick }) => {
data-testId="nav-user"
>
{acronym}
</Avatar>
</Avatar>
<Menu
id="fade-menu"
anchorEl={anchorEl}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Tutorials/subComps/AddNewStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ const AddNewStepModal = ({
style={{ marginBottom: "2rem" }}
data-testid={"newStepTitleInput"}
required="true"

/>
<TextField
type="number"
Expand All @@ -137,7 +136,7 @@ const AddNewStepModal = ({
style={{ width: "100%" }}
data-testid={"newStepTimeInput"}
inputProps={{ min: 0 }}
required="true"
required="true"
/>
<Button
style={{ marginTop: "2rem", marginRight: "7px" }}
Expand Down
Loading

0 comments on commit 55548e0

Please sign in to comment.