Skip to content

Commit

Permalink
Clean up from self review
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Jul 12, 2024
1 parent cfb9d77 commit 0da4ac1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 346 deletions.
40 changes: 2 additions & 38 deletions packages/fhir-import/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,10 @@
# Package

<!-- package description -->
Contains view modules that allow a user to perform data import actions

## Installation

```sh
yarn add @opensrp/template
yarn add @opensrp/fhir-import
```

<!--
Include further installation instructions, for instance if the package requires for the user
to manually add css.
-->

## Usage

<!--
### Props/ Configuration
#### linkerField
_Optional_(`string` | `undefined` = `undefined`)
When the table is rendered, you can click anywhere on a row to drill down to the next level of the hierarchy. However, you may want to display some kind of indication that it is possible to drill down on a row of data. The `linkerField` prop allows you to define which field should have this indicator. By default this is set to the `id` field.
-->

### Code examples

<!--
A single simple, minimal, working snippet for each use-case that the package supports
```tsx
import { DrillDownTable, columnsFromObjects } from '@onaio/drill-down-table/';
const props = {
columns: columnsFromObjects(data),
data
};
<DrillDownTable {...props} />;
```
-->
144 changes: 0 additions & 144 deletions packages/fhir-import/index.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/fhir-import/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opensrp/fhir-import",
"version": "0.0.6",
"version": "0.0.1",
"description": "",
"main": "dist/index.js",
"types": "dist/types",
Expand Down
2 changes: 1 addition & 1 deletion packages/fhir-import/src/components/statusTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export function getStatusColor(statusString: JobStatus) {
default:
return "default"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
gap: 14px;
background: #FFF;
border-radius: 12px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export const workflows = [ {
"stderr": "Start time: 15:26:53\nStarting csv import...\nReading csv file\nReturning records from csv file\nUnsupported request!\n{ \"final-response\": }\nEnd time: 15:26:53\nTotal time: 0.002815 seconds\n"
},
"filename": "organizations_locations.csv"
}]
}]
4 changes: 0 additions & 4 deletions packages/fhir-import/src/containers/StartImportView/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ export const DataImportForm = (props: DataImportFormProps) => {
</Space>
}




// TODO - dry out
/**
* extract file from an input event
*
Expand Down
15 changes: 3 additions & 12 deletions packages/fhir-import/src/helpers/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ export interface WorkflowDescription {
filename: string;
}


export function formatTimestamp(timestamp: number, locale = 'en-US') {
const date = new Date(timestamp);
return date.toLocaleString(locale, {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
});
}
export function formatTimestamp(timestamp: number) {
return new Date(timestamp).toLocaleString();
}
Loading

0 comments on commit 0da4ac1

Please sign in to comment.