Institution Default Products
| Institution | Product Name | Type | Qty | Status | |
|---|---|---|---|---|---|
| Lao National University | Basic Course Access | lifetime | Lifetime | Active | |
| Lao National University | Monthly Plan 1M | period | 1 month | Active | |
| Champasak University | Expert Bundle (Inactive) | lifetime | Lifetime | Inactive |
Screen Flow (from uc-bil-09-manage-institution-default-product.flow.puml):
📝 Spec notes — UC-BIL.09 / SCR-BIL.13 + SCR-BIL.14 (dialog) + SCR-BIL.15 (dialog) + SCR-BIL.20 (dialog)
- Screen: SCR-BIL.13 — Institution Default Products
- Use case: UC-BIL.09 — Manage Institution Default Product
Standalone Billing settings page where Sale Admin searches for institutions and products using dual filters, then manages Default Product assignments. Both filters are optional; clicking Search with no values returns all assignments across all institutions. The product table shows institution name, product name, type, qty (subscription duration — "X months" for period products, "Lifetime" for lifetime products), and status with a Remove button per row. The "Add Default Product" button is always enabled — institution selection lives inside the picker dialog (SCR-BIL.14). Remove actions open the confirmation dialog (SCR-BIL.15) before execution. Products already assigned that are subsequently deactivated remain in the list with an "(Inactive)" label. Success notifications are shown as a dismissible banner.
institution_search"Institution" — text · Filters · always · optional · data_ref: nullproduct_name_filter"Product name" — text · Filters · always · optional · data_ref: nullinstitution_name_col"Institution" — computed · Default product list · visible whenproduct_list.count > 0· read-only · data_ref: null (Institute.name — cross-module; resolve via /analyze-entities)product_name_col"Product Name" — text · Default product list · visible whenproduct_list.count > 0· read-only · data_ref:Product.nameproduct_type_col"Type" — enum [lifetime, period] · visible whenproduct_list.count > 0· read-only · data_ref:Product.typeproduct_qty_col"Qty" — computed · Default product list · visible whenproduct_list.count > 0· read-only · data_ref:InstituteDefaultProduct.qty_months· display: "X months" for period (1/3/6/12), "Lifetime" for lifetime typeproduct_status_col"Status" — text · visible whenproduct_list.count > 0· read-only · data_ref:Product.statusempty_state_message"Empty state message" — text · visible whenproduct_list.count == 0· read-only · fallback: "No Default Products match the current filters."success_banner"Success notification" — text · visible whenshow_success == true· read-only · data_ref: null
select_institution— enabled wheninstitution_search.length > 0· triggers UC-BIL.09-M-2add_default_product"Add Default Product" — enabled: always · triggers UC-BIL.09-M-4 · opens SCR-BIL.14 dialogremove_product"Remove" — enabled: always (per row) · triggers UC-BIL.09-A-3B-1 · opens SCR-BIL.15 confirmation dialogedit_product_duration"Edit" — enabled whenrow_product_type == period· triggers UC-BIL.09-A-3C-1 · opens SCR-BIL.20 dialogsearch"Search" — enabled: always · triggers UC-BIL.09-M-3clear_filters"Clear" — enabled wheninstitution_search.length > 0 || product_name_filter.length > 0
- Only Products with status Active may be added as Default Products. A product already assigned that is subsequently deactivated remains in the list but is shown with an "(Inactive)" label so Sale Admin can identify and optionally remove it. [refs: —]
- Clicking Remove on a Default Product row opens the Remove Default Product Confirmation Dialog (SCR-BIL.15) before the removal is executed. The removal is only performed after Sale Admin confirms in that dialog. [refs: SS-BIL.06]
- Every add or remove action must be recorded in the audit log capturing: institution name, product name, action type (added / removed), actor, and timestamp. [refs: NFR-11]
- The page must conform to WCAG 2.1 Level AA — including visible focus indicators for keyboard navigation and sufficient color contrast for the "(Inactive)" status label. [refs: NFR-09]
- The Qty column displays the subscription duration configured when the Default Product was added. Period products show the duration as "X months" (where X is 1, 3, 6, or 12). Lifetime products display "Lifetime" as the qty value (qty_months is not applicable for lifetime type). [refs: —]
- The Edit action is shown only for period-type Default Products; lifetime products have no duration to edit and show no Edit button in that row. [refs: —]
↳ Embedded dialog: SCR-BIL.14 — Add Default Product Dialog
Modal dialog overlaid on SCR-BIL.13. Sale Admin first selects an institution; once chosen, the product list populates with all active Products not yet assigned as Default Products for that institution. For period products, Sale Admin must also select the subscription duration in months (1 / 3 / 6 / 12). When all active products are already assigned, an informational message is shown and only Cancel is available.
institution_id"Institution" — text · Institution selection · required · always · data_ref:Institute.idselected_product_ids"Select Products" — enum (checkbox per row) · Product list · required (min_length: 1) · visible wheninstitution_id != ""· data_ref:Product.idproduct_name"Product Name" — text · read-only · visible wheninstitution_id != ""· data_ref:Product.nameproduct_type"Type" — enum [lifetime, period] · read-only · visible wheninstitution_id != ""· data_ref:Product.typeproduct_price"Price" — number · read-only · visible wheninstitution_id != ""· data_ref:Product.priceqty_months"Qty (months)" — enum [1, 3, 6, 12] · required whenproduct_type == period· visible wheninstitution_id != "" && product_type == period· default: "1" · data_ref:InstituteDefaultProduct.qty_monthsempty_list_message— read-only · visible wheninstitution_id != "" && available_products.count == 0· fallback: "All available products have already been assigned to this institution."
confirm"Confirm" — enabled whenrequired_fields_valid· triggers UC-BIL.09-M-6cancel"Cancel" — always enabled · triggers UC-BIL.09-A-5A-2 · data-bs-dismiss="modal"
- The product list is not shown until an institution is selected. Once an institution is selected, the list shows only active Products not yet assigned to that institution. When all active products are already assigned, the product list is empty and the empty_list_message is shown. The Confirm button is disabled (required_fields_valid = false because selected_product_ids is empty). [refs: —]
- For each period product selected, Sale Admin must specify the subscription duration via qty_months (1 / 3 / 6 / 12 months). This value determines the duration of the subscription automatically granted to each learner upon affiliation. Lifetime products have no qty_months selection. [refs: —]
↳ Embedded dialog: SCR-BIL.15 — Remove Default Product Confirmation Dialog
Modal confirmation dialog overlaid on SCR-BIL.13. Displayed when Sale Admin clicks the Remove button on a Default Product row. Shows the institution name and product name of the assignment to be removed, plus the business impact statement. Sale Admin clicks Confirm Remove to proceed or Cancel to dismiss without change.
target_institution_name"Institution" — computed · Assignment details · always · read-only · data_ref: null (Institute.name — cross-module)target_product_name"Product" — computed · Assignment details · always · read-only · data_ref:Product.nameimpact_message"Impact notice" — text · Impact statement · always · read-only · literal: "Removing this Default Product means future learners affiliated with this institution will no longer automatically receive a subscription to this product. Subscriptions already granted to existing affiliated learners are not affected."
confirm_remove"Confirm Remove" — enabled: always · triggers UC-BIL.09-A-3B-3cancel"Cancel" — enabled: always · data-bs-dismiss="modal"
- The dialog must display both the institution name and the product name of the assignment being removed so Sale Admin can verify the correct record before confirming. [refs: —]
- The impact message must explicitly state that removing the Default Product affects only future learner affiliation events — subscriptions already granted to existing affiliated learners are not affected. [refs: SS-BIL.06]
↳ Embedded dialog: SCR-BIL.20 — Edit Default Product Duration Dialog
Modal dialog overlaid on SCR-BIL.13. Opened by clicking Edit on a period-type Default Product row (lifetime products have no Edit action — there is no duration to change). Shows the institution name and product name of the assignment (read-only) and the current subscription duration in a dropdown (1 / 3 / 6 / 12 months). User selects a new duration and clicks Confirm to save; Cancel closes the dialog without changes. The new duration only applies to future newly affiliated learners.
target_institution_name"Institution" — computed · Assignment details · always · read-only · data_ref: null (Institute.name — cross-module)target_product_name"Product" — computed · Assignment details · always · read-only · data_ref:Product.nameqty_months"Qty (months)" — enum [1, 3, 6, 12] · Duration selection · required · pre-filled with the assignment's current duration · data_ref:InstituteDefaultProduct.qty_months
confirm"Confirm" — enabled whenrequired_fields_valid· triggers UC-BIL.09-A-3C-3cancel"Cancel" — always enabled · data-bs-dismiss="modal"
- This dialog is only reachable for period-type Default Products. Lifetime products have no qty_months value and show no Edit action on SCR-BIL.13. [refs: —]
- Changing the duration only affects learners who affiliate with the institution after the change is saved. Learners already granted a subscription under the previous duration keep that subscription unchanged. [refs: SS-BIL.06]