จัดการผู้ใช้งาน
This commit is contained in:
parent
c99786a634
commit
5c68d4be8c
4 changed files with 16 additions and 6 deletions
|
|
@ -96,7 +96,8 @@ export default {
|
||||||
|
|
||||||
orgDeceasedProfile: `${orgPos}/profile/search`,
|
orgDeceasedProfile: `${orgPos}/profile/search`,
|
||||||
|
|
||||||
orgProfileListKeycloak: () => `${orgProfile}/search-personal-no-keycloak`,
|
orgProfileListKeycloak: (type: string) =>
|
||||||
|
`${orgProfile}${type}/search-personal-no-keycloak`,
|
||||||
|
|
||||||
/** กำหนดสิทธิ์จัดการโครงสร้าง */
|
/** กำหนดสิทธิ์จัดการโครงสร้าง */
|
||||||
permissionOrg: `${organization}/permission-org`,
|
permissionOrg: `${organization}/permission-org`,
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
employeeClass: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
|
|
@ -142,8 +146,9 @@ function fetchListUser() {
|
||||||
};
|
};
|
||||||
http
|
http
|
||||||
.post(
|
.post(
|
||||||
config.API.orgProfileListKeycloak() +
|
config.API.orgProfileListKeycloak(
|
||||||
`?page=${query.page}&pageSize=${query.pageSize}`,
|
props.employeeClass === "employee" ? "-employee" : ""
|
||||||
|
) + `?page=${query.page}&pageSize=${query.pageSize}`,
|
||||||
body
|
body
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -221,6 +226,8 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const url = isStatusEdit.value
|
const url = isStatusEdit.value
|
||||||
? config.API.managementUser + `/${userId.value}`
|
? config.API.managementUser + `/${userId.value}`
|
||||||
|
: props.employeeClass === "employee"
|
||||||
|
? config.API.managementUser + `/emp`
|
||||||
: config.API.managementUser;
|
: config.API.managementUser;
|
||||||
|
|
||||||
http[isStatusEdit.value ? "put" : "post"](url, {
|
http[isStatusEdit.value ? "put" : "post"](url, {
|
||||||
|
|
@ -245,6 +252,7 @@ function onSubmit() {
|
||||||
* ฟังก์ชัน ปิด Dialog และกำหนด ตัวแปรไปเป็นค่า defult
|
* ฟังก์ชัน ปิด Dialog และกำหนด ตัวแปรไปเป็นค่า defult
|
||||||
*/
|
*/
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
|
rows.value = [];
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
formData.profileId = "";
|
formData.profileId = "";
|
||||||
formData.username = "";
|
formData.username = "";
|
||||||
|
|
|
||||||
|
|
@ -501,8 +501,9 @@ onMounted(async () => {
|
||||||
<DialogAddUser
|
<DialogAddUser
|
||||||
:fetchlist="fetchListUsers"
|
:fetchlist="fetchListUsers"
|
||||||
v-model:modal="modalDialogAdd"
|
v-model:modal="modalDialogAdd"
|
||||||
v-model:isStatusEdit="isStatusEdit"
|
v-model:is-status-edit="isStatusEdit"
|
||||||
:userId="userId"
|
:user-id="userId"
|
||||||
|
:employee-class="employeeClass"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ async function fetchCommandType() {
|
||||||
page: page.value,
|
page: page.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
isActive: isActive.value,
|
isActive: isActive.value,
|
||||||
search: keyword.value,
|
keyword: keyword.value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue