Skip to content

Commit

Permalink
Deploy civ updates (#202)
Browse files Browse the repository at this point in the history
* fix(#199): moh civ user management tool issues (#200)

* fix(#199): remove duplicate first name

fix medic/config-moh-civ#200

* fix(#199): remove required country area in phone

fix medic/config-moh-civ#200

* fix(#199): add grand parent level on the hierarchy

fix medic/config-moh-civ#200

* fix(#199): add supervision level on the hierarchy

(cherry picked from commit 0c6060f)

* Add hint to contact properties (#201)

(cherry picked from commit 59b5a2d)

* fix(#203): update civ config (#204)

* feat(#158): integration of user management tool into civ project (#164)

---------

Co-authored-by: Alassane Ndoye <[email protected]>
Co-authored-by: paulpascal <[email protected]>
  • Loading branch information
3 people authored Sep 17, 2024
1 parent 70de746 commit ca21075
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
dist
.env*
src/package.json
.eslintcache
.eslintcache
.DS_Store
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Property | Type | Description
`contact_types.place_properties` | Array<ConfigProperty> | Defines the attributes which are collected and set on the user's created place. See [ConfigProperty](#ConfigProperty).
`contact_types.contact_properties` | Array<ConfigProperty> | Defines the attributes which are collected and set on the user's primary contact doc. See [ConfigProperty](#ConfigProperty).
`contact_types.deactivate_users_on_replace` | boolean | Controls what should happen to the defunct contact and user documents when a user is replaced. When `false`, the contact and user account will be deleted. When `true`, the contact will be unaltered and the user account will be assigned the role `deactivated`. This allows for account restoration.
`contact_types.hint` | string | Provide a brief hint or description to clarify the expected input for the property.
`logoBase64` | Image in base64 | Logo image for your project

#### ConfigProperty
Expand Down
232 changes: 232 additions & 0 deletions src/config/chis-civ/config.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/config/chis-civ/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PartnerConfig } from '..';
import config from './config.json';

const partnerConfig: PartnerConfig = {
config
};

export default partnerConfig;
Binary file added src/config/chis-civ/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/config/config-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { PartnerConfig } from '.';
import ugandaConfig from './chis-ug';
import kenyaConfig from './chis-ke';
import togoConfig from './chis-tg';
import civConfig from './chis-civ';

const CONFIG_MAP: { [key: string]: PartnerConfig } = {
'CHIS-KE': kenyaConfig,
'CHIS-UG': ugandaConfig,
'CHIS-TG': togoConfig
'CHIS-TG': togoConfig,
'CHIS-CIV': civConfig
};

export default function getConfigByKey(key: string = 'CHIS-KE'): PartnerConfig {
Expand Down
1 change: 1 addition & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type ContactType = {
place_properties: ContactProperty[];
contact_properties: ContactProperty[];
deactivate_users_on_replace: boolean;
hint?: string;
};

export type HierarchyConstraint = {
Expand Down
6 changes: 3 additions & 3 deletions src/liquid/place/bulk_create_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<tr>
<td>{{ row.friendly_name }}</td>
<td>{{ row.required }}</td>
<td>Property on place</td>
<td>{% if row.hint %} <i>{{ row.hint }}</i> {% else %} Property on place. {% endif %}</td>
</tr>
{% endif %}
{% endfor %}
Expand All @@ -84,7 +84,7 @@
<tr>
<td>{{ row.friendly_name }}</td>
<td>{{ row.required }}</td>
<td>Property on primary contact</td>
<td>{% if row.hint %} <i>{{ row.hint }}</i> {% else %} Property on primary contact. {% endif %}</td>
</tr>
{% endif %}
{% endfor %}
Expand Down Expand Up @@ -117,4 +117,4 @@
}
</script>
</form>
</section>
</section>

0 comments on commit ca21075

Please sign in to comment.