From 11980d06ac786313c911e740820ad70b4d9df855 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Tue, 13 Apr 2021 16:38:16 -0400 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20l'identifiant=20des=20produits=20d?= =?UTF-8?q?ans=20les=20errors=20de=20quantit=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/fyloz/colorrecipesexplorer/service/AccountService.kt | 2 +- .../dev/fyloz/colorrecipesexplorer/service/InventoryService.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/AccountService.kt b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/AccountService.kt index 183ccd9..d3b81ba 100644 --- a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/AccountService.kt +++ b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/AccountService.kt @@ -129,7 +129,7 @@ class EmployeeServiceImpl( override fun saveDefaultGroupEmployee(group: EmployeeGroup) { save( - Employee( + employee( id = 1000000L + group.id!!, firstName = group.name, lastName = "EmployeeModel", diff --git a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/InventoryService.kt b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/InventoryService.kt index 965425a..cefb0b0 100644 --- a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/InventoryService.kt +++ b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/service/InventoryService.kt @@ -95,6 +95,7 @@ class NotEnoughInventoryException(quantity: Float, material: Material) : "Cannot deduct ${quantity}mL of ${material.name} because there is only ${material.inventoryQuantity}mL in inventory", mapOf( "material" to material.name, + "materialId" to material.id.toString(), "requestQuantity" to quantity, "availableQuantity" to material.inventoryQuantity )