feat: role option, hideBotSpace
This commit is contained in:
parent
b020645e8d
commit
2a9097fcc6
1 changed files with 17 additions and 1 deletions
|
|
@ -153,8 +153,14 @@ async function createKeycloak() {
|
||||||
async function fetchRoleOption() {
|
async function fetchRoleOption() {
|
||||||
const res = await api.get<RoleData[]>('/keycloak/role');
|
const res = await api.get<RoleData[]>('/keycloak/role');
|
||||||
res.data.map((item) => {
|
res.data.map((item) => {
|
||||||
|
const formattedName = item.name
|
||||||
|
.replace(/_/g, ' ')
|
||||||
|
.toLowerCase()
|
||||||
|
.split(' ')
|
||||||
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||||
|
.join(' ');
|
||||||
userOption.value.roleOpts.push({
|
userOption.value.roleOpts.push({
|
||||||
label: item.name,
|
label: formattedName,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -508,6 +514,7 @@ watch(
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
|
|
@ -524,6 +531,7 @@ watch(
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
label="รหัสสาขา"
|
label="รหัสสาขา"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
|
|
@ -539,6 +547,7 @@ watch(
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
|
|
@ -554,6 +563,7 @@ watch(
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
label="สิทธิ์ผู้ใช้งาน"
|
label="สิทธิ์ผู้ใช้งาน"
|
||||||
|
|
@ -566,6 +576,7 @@ watch(
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
label="ชื่อผู้ใช้งาน (Username)"
|
label="ชื่อผู้ใช้งาน (Username)"
|
||||||
|
|
@ -576,6 +587,7 @@ watch(
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
label="รหัสพนักงาน"
|
label="รหัสพนักงาน"
|
||||||
|
|
@ -640,6 +652,7 @@ watch(
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="ชื่อ ภาษาไทย"
|
label="ชื่อ ภาษาไทย"
|
||||||
v-model="formData.firstName"
|
v-model="formData.firstName"
|
||||||
|
|
@ -648,6 +661,7 @@ watch(
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="นามสกุล ภาษาไทย"
|
label="นามสกุล ภาษาไทย"
|
||||||
v-model="formData.lastName"
|
v-model="formData.lastName"
|
||||||
|
|
@ -656,6 +670,7 @@ watch(
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="ชื่อ ภาษาอังกฤษ"
|
label="ชื่อ ภาษาอังกฤษ"
|
||||||
v-model="formData.firstNameEN"
|
v-model="formData.firstNameEN"
|
||||||
|
|
@ -664,6 +679,7 @@ watch(
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="นามสกุล ภาษาอังกฤษ"
|
label="นามสกุล ภาษาอังกฤษ"
|
||||||
v-model="formData.lastNameEN"
|
v-model="formData.lastNameEN"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue