Skip to content

Commit

Permalink
Merge pull request #5421 from msupply-foundation/#5395-patient-sorted…
Browse files Browse the repository at this point in the history
…-by-created-date

#5395 patient sorted by created date
  • Loading branch information
sah-arjun authored Jan 11, 2024
2 parents 162587a + 069a052 commit 903442a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"name": "mSupplyMobile",
"//": "version must be in the format ${majorNumber}.${minorNumber}.${patchNumber}-rc${releaseCandidateNumber}",
"version": "8.6.8-rc01",
"version": "8.6.8-rc02",
"private": false,
"license": "MIT",
"description": "Mobile app for use with the mSupply medical inventory control software",
Expand Down
6 changes: 4 additions & 2 deletions src/pages/dataTableUtilities/getColumns.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ROUTES } from '../../navigation/constants';
import { FORMS, MODALS, TABS } from '../../widgets/constants';

const PAGE_COLUMN_WIDTHS = {
[FORMS.PATIENT]: [2.5, 4, 4, 2.5, 2, 2, 2],
[FORMS.PATIENT]: [2.5, 2, 4, 4, 2, 2, 2, 2],
[FORMS.PRESCRIBER]: [1, 3, 3, 1],
[MODALS.PATIENT_HISTORY]: [1, 4, 1, 1, 2],
[MODALS.VACCINE_HISTORY]: [1, 4, 1, 1, 2],
Expand Down Expand Up @@ -61,7 +61,7 @@ const PAGE_COLUMN_WIDTHS = {
[TABS.VACCINE_BATCH]: [1, 1, 1, 1],
editableCustomerRequisitionFormEntry: [2, 1.5, 1, 1, 1, 1.5, 1, 1, 1, 1.5],
customerRequisitionFormEntry: [2, 2, 1, 1, 1, 1, 2, 2, 2, 2],
patientWithAdverseDrugReactions: [2.5, 4, 4, 2.5, 2, 2, 2, 2],
patientWithAdverseDrugReactions: [3, 2, 4, 4, 2, 2, 1.5, 1.5, 2],
};

const PAGE_COLUMNS = {
Expand Down Expand Up @@ -108,6 +108,7 @@ const PAGE_COLUMNS = {
COLUMN_NAMES.REMOVE,
],
[FORMS.PATIENT]: [
COLUMN_KEYS.CREATED_DATE,
COLUMN_NAMES.CODE,
COLUMN_NAMES.LAST_NAME,
COLUMN_NAMES.FIRST_NAME,
Expand All @@ -117,6 +118,7 @@ const PAGE_COLUMNS = {
COLUMN_NAMES.DISPENSE,
],
patientWithAdverseDrugReactions: [
COLUMN_KEYS.CREATED_DATE,
COLUMN_NAMES.CODE,
COLUMN_NAMES.LAST_NAME,
COLUMN_NAMES.FIRST_NAME,
Expand Down
8 changes: 4 additions & 4 deletions src/reducers/DispensaryReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const initialState = () => {

return {
searchTerm: '',
sortKey: 'firstName',
isAscending: true,
sortKey: 'createdDate',
isAscending: false,
dataSet: defaultDataSet,
columns: getColumns(defaultDataSet),
data: UIDatabase.objects('Patient'),
Expand Down Expand Up @@ -73,8 +73,8 @@ export const DispensaryReducer = (state = initialState(), action) => {
...state,
dataSet: newDataSet,
columns: newColumns,
sortKey: 'firstName',
isAscending: true,
sortKey: 'createdDate',
isAscending: false,
searchTerm: '',
data: newData,
};
Expand Down

0 comments on commit 903442a

Please sign in to comment.