Skip to content

Commit

Permalink
refactor(model): use namespaced defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Jun 8, 2020
1 parent a176849 commit cd6a0f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/schema/base.schema.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {
PREDEFINE_NAMESPACE_CASESEVERITY,
PREDEFINE_NAMESPACE_CASESTAGE,
} from '@codetanzania/ewea-internals';
import { get } from 'lodash';
import moment from 'moment';
import { ObjectId } from '@lykmapipo/mongoose-common';
Expand Down Expand Up @@ -180,7 +184,7 @@ export const stage = {
format: (v) => get(v, 'strings.name.en'),
default: 'NA',
},
default: DEFAULT_SEEDS.CaseStage,
default: DEFAULT_SEEDS[PREDEFINE_NAMESPACE_CASESTAGE],
};

/**
Expand Down Expand Up @@ -224,7 +228,7 @@ export const severity = {
format: (v) => get(v, 'strings.name.en'),
default: 'NA',
},
default: DEFAULT_SEEDS.CaseSeverity,
default: DEFAULT_SEEDS[PREDEFINE_NAMESPACE_CASESEVERITY],
};

/**
Expand Down

0 comments on commit cd6a0f1

Please sign in to comment.