Skip to content

Commit

Permalink
feat: add unit split to unit status
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Jan 10, 2023
1 parent 7be9fe1 commit 5c9fd0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ export const split = async (req, res) => {
newRecord.unitOwner = record.unitOwner;
}

if (record.unitStatus) {
newRecord.unitStatus = record.unitStatus;
}

if (record.countryJurisdictionOfOwner) {
newRecord.countryJurisdictionOfOwner =
record.countryJurisdictionOfOwner;
Expand Down
3 changes: 3 additions & 0 deletions src/validations/units.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export const unitsSplitSchema = Joi.object({
unitBlockStart: Joi.string().required(),
unitBlockEnd: Joi.string().required(),
unitOwner: Joi.string().optional(),
unitStatus: Joi.string()
.custom(pickListValidation('unitStatus'))
.optional(),
countryJurisdictionOfOwner: Joi.string()
.custom(pickListValidation('countries', 'countryJurisdictionOfOwner'))
.optional(),
Expand Down

0 comments on commit 5c9fd0c

Please sign in to comment.