ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
62 stars 80 forks source link

[Pick up city UBS.UBS Admin Cabinet] We need to add validation on the edit order page in GreenCityUBS to check if an order is blocked by another admin. Additionally, we need to add new endpoints to unblock the order on 'back' and 'cancel' buttons in edit order page. #7214

Closed KizerovDmitriy closed 1 week ago

KizerovDmitriy commented 3 weeks ago

Preconditions

  1. User is logged in as admin e.g. admin1.
  2. Orders tab is opened.
  3. User is logged in as admin e.g. admin2.
  4. Orders tab is opened.
  5. At least 1 order is in the orders table.

Expected result

The 'Blocked by' column for this order can be auto-filled when an employee with ‘Edit an order card’ permission opens the order. While the order is opened, other employees can open this order in Read-only mode. This field should be empty when an employee without ‘Edit an order card’ permission opens the order. The order is available for editing by other employees.

Need to add to this buttons endpoint "ubs/managment/unblockOrders": image image

And make the button 'Save' inactive if the order has already been blocked by someone. This information we take from JSON:

image