Skip to content

Commit

Permalink
fix: support intervention type flag in fortifiable foods
Browse files Browse the repository at this point in the history
  • Loading branch information
Bean, Andrew K committed Nov 6, 2024
1 parent 2b688ea commit 36e8b43
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/controllers/intervention.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,13 @@ export class InterventionController {
const fortificationLevelSummary =
await this.interventionFortificationLevelSummaryRepository.find(filter);

const fortifiableFoodItems =
await this.fortifiableFoodItemsRepository.find();
const fortifiableFoodItems = await this.fortifiableFoodItemsRepository.find(
{
where: {
lsff: true,
},
},
);

const interventionDetails = await this.interventionListRepository.find({
where: {
Expand Down
39 changes: 39 additions & 0 deletions src/models/fortifiable-food-items.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,45 @@ export class FortifiableFoodItems extends Entity {
})
food_group_id?: number;

@property({
type: 'boolean',
postgresql: {
columnName: 'lsff',
dataType: 'boolean',
dataLength: null,
dataPrecision: null,
dataScale: null,
nullable: 'YES',
},
})
lsff?: boolean;

@property({
type: 'boolean',
postgresql: {
columnName: 'bio',
dataType: 'boolean',
dataLength: null,
dataPrecision: null,
dataScale: null,
nullable: 'YES',
},
})
bio?: boolean;

@property({
type: 'boolean',
postgresql: {
columnName: 'fert',
dataType: 'boolean',
dataLength: null,
dataPrecision: null,
dataScale: null,
nullable: 'YES',
},
})
fert?: boolean;

// Define well-known properties here

// Indexer property to allow additional data
Expand Down

0 comments on commit 36e8b43

Please sign in to comment.