mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(web): I1 shell and I2 customer/project UI
Vue 3 + Element Plus layout with JWT login, RBAC routes, axios 401 handling with token restore, and Customers/Projects views wired to platform APIs. Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import axios from "axios";
|
||||
|
||||
/**
|
||||
* @param {{ page?: number, size?: number, keyword?: string }} params
|
||||
*/
|
||||
export function listCustomers(params) {
|
||||
return axios.get("/api/v1/customers", { params });
|
||||
}
|
||||
|
||||
export function createCustomer(body) {
|
||||
return axios.post("/api/v1/customers", body);
|
||||
}
|
||||
|
||||
export function updateCustomer(id, body) {
|
||||
return axios.put(`/api/v1/customers/${id}`, body);
|
||||
}
|
||||
|
||||
export function deleteCustomer(id) {
|
||||
return axios.delete(`/api/v1/customers/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ page?: number, size?: number, customerId?: string | number }} params
|
||||
*/
|
||||
export function listProjects(params) {
|
||||
return axios.get("/api/v1/projects", { params });
|
||||
}
|
||||
|
||||
export function createProject(body) {
|
||||
return axios.post("/api/v1/projects", body);
|
||||
}
|
||||
|
||||
export function updateProject(id, body) {
|
||||
return axios.put(`/api/v1/projects/${id}`, body);
|
||||
}
|
||||
|
||||
export function deleteProject(id) {
|
||||
return axios.delete(`/api/v1/projects/${id}`);
|
||||
}
|
||||
|
||||
export function getProjectPhaseDictionary() {
|
||||
return axios.get("/api/v1/dictionaries/PROJECT_PHASE");
|
||||
}
|
||||
Reference in New Issue
Block a user