Skip to content

Commit

Permalink
Merge pull request #144 from avinyafoundation/main
Browse files Browse the repository at this point in the history
asset dashboard changes added
  • Loading branch information
YujithIsura authored Aug 13, 2024
2 parents 8656a9c + 72cbeda commit 1b75d4e
Show file tree
Hide file tree
Showing 4 changed files with 848 additions and 747 deletions.
6 changes: 6 additions & 0 deletions api/consumable_data.bal
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public isolated service class ConsumableData{
}
}

isolated resource function get threshold() returns decimal?|error {
lock {
return self.consumable.threshold;
}
}

isolated resource function get created() returns string?|error {
lock {
return self.consumable.created;
Expand Down
13 changes: 12 additions & 1 deletion api/inventory_data.bal
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ public isolated service class InventoryData{
return self.inventory.name;
}
}


isolated resource function get month_name() returns string?|error {
lock {
return self.inventory.month_name;
}
}

isolated resource function get description() returns string?|error {
lock {
Expand All @@ -151,6 +156,12 @@ public isolated service class InventoryData{
}
}

isolated resource function get is_below_threshold() returns int?|error {
lock {
return self.inventory.is_below_threshold;
}
}

isolated resource function get created() returns string?|error {
lock {
return self.inventory.created;
Expand Down
Loading

0 comments on commit 1b75d4e

Please sign in to comment.