Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying tile CSS style, adjusting date picker format #8

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
72f1420
ft : add app dashboard header
Daphne210 Oct 4, 2023
2d9c4b3
ft: add gitflow
Daphne210 Oct 4, 2023
8a08d65
fix : build error
Daphne210 Oct 4, 2023
fc5e9c3
Adding the tile and data table for data Entry Statistics
Daphne210 Oct 7, 2023
e0aa918
Merge branch 'main' into ft/data-entry-statistics-app
Daphne210 Oct 7, 2023
1794019
Fetching data from the API endpoint
Daphne210 Oct 10, 2023
0840ccb
Merge branch 'ft/data-entry-statistics-app' of https://github.com/Dap…
Daphne210 Oct 10, 2023
0ebd620
Changes to- the data table
Daphne210 Oct 11, 2023
baf52f0
Modifying the table rows
Daphne210 Oct 17, 2023
3aa19c8
Adding default number with no number of entries, adjusting the css of…
Daphne210 Oct 18, 2023
8a3c8cb
Running yarn verify
Daphne210 Oct 19, 2023
c601b89
Adding filter on the header, Changing header to UgandaEMR commons lib…
Daphne210 Oct 19, 2023
60ed8ce
Adjusting README file, running yarn verify
Daphne210 Oct 19, 2023
b370160
fix: update files
Daphne210 Oct 19, 2023
6693c13
Running yarn verify
Daphne210 Oct 19, 2023
1612872
Changing the JS file
Daphne210 Oct 19, 2023
e14492a
Adding data entry statistics app to UgandaEMR plus
Daphne210 Oct 19, 2023
a4f6303
Modifying the tile css style, Adjusting the date picker format
Daphne210 Nov 19, 2023
70c9632
Merge branch 'main' into ft/data-entry-statistics-app
Daphne210 Nov 19, 2023
a94d0c9
Running yarn install
Daphne210 Nov 19, 2023
db98655
Merge branch 'ft/data-entry-statistics-app' of https://github.com/Dap…
Daphne210 Nov 19, 2023
4e63b89
Running yarn install --immutable
Daphne210 Nov 19, 2023
3a03cfc
Running yarn build
Daphne210 Nov 19, 2023
5fe32c6
Correcting the bwoser file
Daphne210 Nov 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- created
env:
ESM_NAME: "@ugandaemr/esm-data-entry-statistics-app"
JS_NAME: "esm-data-entry-statistics-app.js"
JS_NAME: "esm-ugandaemr-data-entry-statistics-app.js"

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -34,11 +34,11 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
Expand Down Expand Up @@ -133,17 +133,17 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}

- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"dependencies": {
"@carbon/react": "^1.33.1",
"@openmrs/esm-patient-common-lib": "next",
"@openmrs/esm-react-utils": "next",
"@ugandaemr/esm-ugandaemr-commons-lib": "next",
"lodash-es": "^4.17.21",
"react-image-annotate": "^1.8.0"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

type FilterProps = {
rowIds: Array<string>;
headers: any;

Check warning on line 48 in src/components/data-entry-tile/data-entry-statistics-tile.component.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
cellsById: any;

Check warning on line 49 in src/components/data-entry-tile/data-entry-statistics-tile.component.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
inputValue: string;
getCellId: (row, key) => string;
};
Expand Down Expand Up @@ -82,25 +82,12 @@
groupBy: groupBy,
}) as EncounterDataResponse;

const handleStartDateChange = (e) => {
if (hasUpdatedParams) {
setFromDate(dayjs(e.target.value).format("YYYY-MM-DD"));
setHasUpdatedParams(true);
setLoading(false);
clearCache();
} else {
setHasUpdatedParams(false);
}
const handleStartDateChange = (selectedDate) => {
setFromDate(dayjs(selectedDate[0]).format("YYYY-MM-DD"));
};

const handleEndDateChange = (e) => {
if (hasUpdatedParams) {
setToDate(dayjs(e.target.value).format("YYYY-MM-DD"));
setHasUpdatedParams(true);
setLoading(false);
} else {
setHasUpdatedParams(false);
}
const handleEndDateChange = (selectedDate) => {
setToDate(dayjs(selectedDate[0]).format("YYYY-MM-DD"));
};

const items = [
Expand Down Expand Up @@ -194,7 +181,7 @@
useEffect(() => {
const rows: Array<Record<string, string>> = [];

paginatedEncounterTypesList.map((item: any, index) => {

Check warning on line 184 in src/components/data-entry-tile/data-entry-statistics-tile.component.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
return rows.push({ ...item, id: index++ });
});
setAllRows(rows);
Expand Down Expand Up @@ -236,57 +223,55 @@
return (
<>
<Tile className={styles.tile}>
<div className={styles.tileContent}>
<div className={styles.tileContainer}>
<Dropdown
id="encounteruser"
titleText={t("encounterUser", "Encounter User")}
label="Data Entry Assistant"
items={items}
size="sm"
initialSelectedItem={items[0]}
itemToString={(item) => (item ? item.text : "")}
onChange={handleEncounterDropdownChange}
className={styles.customLabel}
/>

<DatePicker datePickerType="single" onChange={handleStartDateChange}>
<DatePickerInput
id="date-picker-input-start"
placeholder="mm/dd/yyyy"
labelText="Start date"
size="md"
/>
</DatePicker>
</div>
<div className={styles.tileContainer}>
<Dropdown
id="orderedby"
titleText={t("orderedBy", "Ordered By")}
label="Data Entry Assistant"
size="sm"
items={items}
itemToString={(item) => (item ? item.text : "")}
onChange={handleProviderDropdownChange}
className={styles.customLabel}
/>
<DatePicker datePickerType="single">
<DatePickerInput
id="date-picker-input-start"
placeholder="mm/dd/yyyy"
labelText="Start date"
size="sm"
onChange={handleStartDateChange}
className={styles.customLabel}
/>
</DatePicker>
<DatePicker datePickerType="single">
<DatePicker datePickerType="single" onChange={handleEndDateChange}>
<DatePickerInput
id="date-picker-input-finish"
placeholder="mm/dd/yyyy"
labelText="End date"
size="sm"
onChange={handleEndDateChange}
size="md"
className={styles.customLabel}
/>
</DatePicker>
<div className={styles.actionButtonContainer}>
<Button
size="md"
kind="primary"
onClick={handleUpdateReport}
renderIcon={(props) => <Intersect size={16} {...props} />}
>
<span>View</span>
</Button>
</div>
</div>
<div className={styles.tileContainer}>
<Button
size="sm"
kind="primary"
onClick={handleUpdateReport}
className={styles.actionButton}
>
<Intersect />
<span>View</span>
</Button>
</div>
</Tile>
{showTable ? (
Expand Down
46 changes: 20 additions & 26 deletions src/components/data-entry-tile/data-entry-statistics-tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,35 @@
@use '@carbon/styles/scss/colors';
@use '@carbon/styles/scss/type';
@import "../../root.scss";
* {
box-sizing: border-box;
}

.tile {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
padding: 2rem 1rem;
flex-direction: row;
justify-content: space-evenly;
height: 200px;
width: auto;
padding: 10px;
border-radius: 10px;
margin: 1rem;
.tileContent {
padding-top: 25px;
.tileContainer {
display: flex;
margin: 0;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 1rem;
margin-right: 3rem;
flex-direction: column;
justify-content: space-evenly;
gap: 30px;
:global(.cds--label) {
font-size: 16px;
}
.actionButtonContainer {
display: flex;
flex-shrink: 0;
margin-left: 1rem;
}
:global(.cds--form-item) {
margin-left: 1rem;
flex: 0;
}
:global(.cds--list-box__wrapper) {
margin-left: 1rem;
}
}
.actionButton {
height: 50px;
}
}

:global(.cds--date-picker) {
display: flex;
gap: 10px;
}

.container {
Expand Down
12 changes: 0 additions & 12 deletions src/data-entry-statistics.component.tsx

This file was deleted.

Loading
Loading