Hotline:
08.8803.8803
T2-T7:
8h30 - 20h30
| CN:
8h30 - 17h00

[Demo] Day 1: Separate Archive/Unarchive Actions

admin . 6:12 am

Hello BA, today I’d like to demo the changes for separating Archive / Unarchive actions from the [ABC] Update logic.


First point: Remove archival status update from ABC Update API

Previously, the archival status was updated via the main [abc] update API.
This logic has now been removed — the archival status is no longer updated via the regular update endpoint.

Instead, I’ve implemented two separate APIs:

  • POST /archive
  • POST /unarchive

These are now responsible for handling archive-related actions.


Second point: UI updates to use the new APIs

In the UI, when a user clicks the Archive or Unarchive button:

  • The frontend now calls the respective new APIs:
    • POST /archive
    • or POST /unarchive
  • You can observe this in the browser’s network tab when I perform the action.

Third point: Role-based permission control

The display of the Archive/Unarchive button is now permission-based:

  • If the logged-in user has the ARCHIVE or UNARCHIVE permission, the corresponding button will be shown.
  • If the user does not have the required permission, the button will be hidden.

🔁 Let’s walk through an example

  • First, I’m logged in as a user with archive permission:
    • You can see the Archive button is visible.
    • When I click it, the frontend calls the /archive API — visible in the network tab.
  • Now I’ll switch to a user without permission:
    • After logging in again, you’ll see the Archive button is no longer displayed.

That’s the end of my demo.
Do you have any questions?

If everything looks good to you, may I proceed to mark this ticket with the ba_pass label?