Add self-serve status toggle to DepartmentModulesDisplay and API endpoints for enable/disable actions
This commit is contained in:
+59
-9
@@ -1244,18 +1244,68 @@ paths:
|
||||
- Departments
|
||||
summary: Remove category from department
|
||||
operationId: removeDepartmentCategory
|
||||
parameters:
|
||||
- name: department_id
|
||||
in: query
|
||||
required: true
|
||||
schema: {type: integer}
|
||||
- name: category_id
|
||||
in: query
|
||||
required: true
|
||||
schema: {type: integer}
|
||||
responses:
|
||||
'200': {description: Success}
|
||||
|
||||
/departments/self-serve/enabled:
|
||||
get:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Get department self-serve status
|
||||
description: Check if self-serve is enabled for a specific department
|
||||
operationId: getDepartmentSelfServeEnabled
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: true
|
||||
description: Department ID
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved status
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
put:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Update department self-serve status
|
||||
description: Enable or disable self-serve for a specific department
|
||||
operationId: updateDepartmentSelfServeEnabled
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: true
|
||||
description: Department ID
|
||||
schema:
|
||||
type: integer
|
||||
- name: enabled
|
||||
in: query
|
||||
required: true
|
||||
description: Enabled status (true/false)
|
||||
schema:
|
||||
type: string
|
||||
enum: ['true', 'false']
|
||||
responses:
|
||||
'200':
|
||||
description: Status updated successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
|
||||
/departments/order/recommended:
|
||||
get:
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user