fix bug user-group page

parent 27241479
...@@ -20,8 +20,11 @@ export default defineComponent({ ...@@ -20,8 +20,11 @@ export default defineComponent({
const keyword = ref(''); const keyword = ref('');
const filteredListUsers = computed(() => { const filteredListUsers = computed(() => {
return props.listUsers.filter((group) => return props.listUsers.filter(
group.groupName.includes(keyword.value) (group) =>
group.groupName.includes(keyword.value.trim()) ||
group.groupName.includes(keyword.value.trim().toUpperCase()) ||
group.groupName.includes(keyword.value.trim().toLowerCase())
); );
}); });
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
> >
<template v-slot:prepend> <template v-slot:prepend>
<div class="text-body2"> <div class="text-body2">
{{ $t('userPage.dialogLabel.fieldLabels.birthday') }} {{ $t('userPage.dialogLabel.fieldLabels.birthday') }} *
</div> </div>
</template> </template>
</q-input> </q-input>
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
> >
<template v-slot:prepend> <template v-slot:prepend>
<div class="text-body2"> <div class="text-body2">
{{ $t('userPage.dialogLabel.fieldLabels.birthday') }} {{ $t('userPage.dialogLabel.fieldLabels.birthday') }} *
</div> </div>
</template> </template>
</q-input> </q-input>
......
...@@ -40,10 +40,10 @@ export default { ...@@ -40,10 +40,10 @@ export default {
groupInfo: { groupInfo: {
title: 'Thông tin nhóm', title: 'Thông tin nhóm',
validateMessages: { validateMessages: {
requireGroupName: 'Vui lòng cung cấp tên nhóm người dùng', requireGroupName: 'Vui lòng nhập Tên nhóm người dùng',
groupNameLengthInvalid: groupNameLengthInvalid:
'Tên nhóm người dùng chỉ có thể dài tối đa 10 ký tự', 'Tên nhóm người dùng chỉ có thể dài tối đa 10 ký tự',
requireGroupDescription: 'Vui lòng cung cấp mô tả nhóm người dùng', requireGroupDescription: 'Vui lòng nhập Mô tả nhóm người dùng',
}, },
actionMessages: { actionMessages: {
addNewSuccess: 'Thêm nhóm người dùng thành công', addNewSuccess: 'Thêm nhóm người dùng thành công',
......
...@@ -35,8 +35,8 @@ const addNewGroupInfo = async ($store: Store<StateInterface>) => { ...@@ -35,8 +35,8 @@ const addNewGroupInfo = async ($store: Store<StateInterface>) => {
method: 'POST', method: 'POST',
data: { data: {
group: { group: {
groupName: groupName.value, groupName: groupName.value.trim(),
description: groupDescription.value, description: groupDescription.value.trim(),
}, },
users: [], users: [],
pageRoles: [], pageRoles: [],
...@@ -108,8 +108,8 @@ const updateGroupInfo = async ($store: Store<StateInterface>) => { ...@@ -108,8 +108,8 @@ const updateGroupInfo = async ($store: Store<StateInterface>) => {
data: { data: {
group: { group: {
id: selectedGroupId.value, id: selectedGroupId.value,
groupName: groupName.value, groupName: groupName.value.trim(),
description: groupDescription.value, description: groupDescription.value.trim(),
}, },
pageRoles, pageRoles,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment