From 423c0f8fbb80b4c3af795ed82b82f8d314e0776b Mon Sep 17 00:00:00 2001 From: Bhrugen Patel Date: Sun, 26 Sep 2021 16:44:51 -0500 Subject: [PATCH] Section 11 - Order Processing Buttons Logic --- .../Areas/Admin/Views/Order/Details.cshtml | 78 ++++++++++++------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/BulkyBookWeb/Areas/Admin/Views/Order/Details.cshtml b/BulkyBookWeb/Areas/Admin/Views/Order/Details.cshtml index 11da925..e8cceaf 100644 --- a/BulkyBookWeb/Areas/Admin/Views/Order/Details.cshtml +++ b/BulkyBookWeb/Areas/Admin/Views/Order/Details.cshtml @@ -25,7 +25,8 @@
Name
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -38,7 +39,8 @@
Phone
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -51,7 +53,8 @@
Address
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -64,7 +67,8 @@
City
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -77,7 +81,8 @@
State
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -90,7 +95,8 @@
Zip Code
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { } @@ -103,22 +109,23 @@
Email
- +
Order Date
- - - + + +
Carrier
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ - + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { + } else { @@ -129,8 +136,9 @@
Tracking
- @if(User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)){ - + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { + } else { @@ -165,15 +173,16 @@
Payment Due Date
+ readonly type="text" class="form-control" />
} - else{ -
Payment Date
-
- -
+ else + { +
Payment Date
+
+ +
}
@@ -196,7 +205,7 @@
    - @foreach(var detail in Model.OrderDetail) + @foreach (var detail in Model.OrderDetail) {
  • @@ -224,10 +233,27 @@
- - - - + @if (User.IsInRole(SD.Role_Admin) || User.IsInRole(SD.Role_Employee)) + { + if (Model.OrderHeader.OrderStatus == SD.StatusApproved) + { + + } + if (Model.OrderHeader.OrderStatus == SD.StatusInProcess) + { + + } + @if (Model.OrderHeader.PaymentStatus == SD.PaymentStatusDelayedPayment && + Model.OrderHeader.OrderStatus == SD.StatusShipped) + { + + } + @if (Model.OrderHeader.OrderStatus != SD.StatusRefunded || + Model.OrderHeader.OrderStatus != SD.StatusCancelled) + { + + } + }