จัดการผู้ใช้งาน
This commit is contained in:
parent
c99786a634
commit
5c68d4be8c
4 changed files with 16 additions and 6 deletions
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
|||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
employeeClass: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
// Table
|
||||
|
|
@ -142,8 +146,9 @@ function fetchListUser() {
|
|||
};
|
||||
http
|
||||
.post(
|
||||
config.API.orgProfileListKeycloak() +
|
||||
`?page=${query.page}&pageSize=${query.pageSize}`,
|
||||
config.API.orgProfileListKeycloak(
|
||||
props.employeeClass === "employee" ? "-employee" : ""
|
||||
) + `?page=${query.page}&pageSize=${query.pageSize}`,
|
||||
body
|
||||
)
|
||||
.then(async (res) => {
|
||||
|
|
@ -221,6 +226,8 @@ function onSubmit() {
|
|||
showLoader();
|
||||
const url = isStatusEdit.value
|
||||
? config.API.managementUser + `/${userId.value}`
|
||||
: props.employeeClass === "employee"
|
||||
? config.API.managementUser + `/emp`
|
||||
: config.API.managementUser;
|
||||
|
||||
http[isStatusEdit.value ? "put" : "post"](url, {
|
||||
|
|
@ -245,6 +252,7 @@ function onSubmit() {
|
|||
* ฟังก์ชัน ปิด Dialog และกำหนด ตัวแปรไปเป็นค่า defult
|
||||
*/
|
||||
function closeDialog() {
|
||||
rows.value = [];
|
||||
modal.value = false;
|
||||
formData.profileId = "";
|
||||
formData.username = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue