diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs index 1a662d524..3850c2c1b 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs @@ -164,7 +164,11 @@ public async Task GetDevIdDetails(int resourceVersionId) public async Task UpdateDevIdDetails(ResourceVersionDevIdViewModel model) { var message = string.Empty; - if (await this.resourceService.DoesDevIdExistsAsync(model.DevId)) + if (string.IsNullOrEmpty(model.DevId)) + { + message = "Enter a Dev id for the resource"; + } + else if (await this.resourceService.DoesDevIdExistsAsync(model.DevId)) { message = "Duplicate"; } diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml index 44b2f9b11..5c7b99069 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml @@ -651,13 +651,19 @@ {
-
Successfully updated the details
+
Successfully added the Dev ID.
} @if (this.ViewBag.Status == "Duplicate") {
-
Dev Id already exists.
+
Dev ID already exists.
+
+ } + else if (this.ViewBag.Status == "Enter a Dev id for the resource") + { +
+
You must enter a Dev ID.
}
diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml index 7e6c5bf71..1af9e2808 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml @@ -8,15 +8,23 @@
- - +
+
+
Dev ID:
+
+ @Html.DisplayFor(model => model.DevId) +
+
+
+ +
- -
+ +
\ No newline at end of file