Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
ed8733bc
Commit
ed8733bc
authored
May 19, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed date
parent
8a408ba7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
AddNewUserDialog.ts
...s/user-management/add-new-user-dialog/AddNewUserDialog.ts
+5
-2
index.vue
src/components/user-management/add-new-user-dialog/index.vue
+4
-0
UpdateUserDialog.ts
...ts/user-management/update-user-dialog/UpdateUserDialog.ts
+5
-2
index.vue
src/components/user-management/update-user-dialog/index.vue
+4
-0
No files found.
src/components/user-management/add-new-user-dialog/AddNewUserDialog.ts
View file @
ed8733bc
import
{
defineComponent
,
PropType
}
from
'vue'
;
import
{
defineComponent
,
PropType
,
ref
,
Ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
{
GroupInfoType
}
from
'src/pages/nhom-nguoi-dung/UserGroup'
;
import
{
GroupInfoType
}
from
'src/pages/nhom-nguoi-dung/UserGroup'
;
import
moment
from
'moment'
;
export
default
defineComponent
({
export
default
defineComponent
({
props
:
{
props
:
{
showDialog
:
{
showDialog
:
{
...
@@ -28,6 +28,8 @@ export default defineComponent({
...
@@ -28,6 +28,8 @@ export default defineComponent({
status
:
{
type
:
Boolean
,
required
:
true
},
status
:
{
type
:
Boolean
,
required
:
true
},
},
},
setup
()
{
setup
()
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const
today
=
ref
(
moment
().
format
(
'YYYY/MM/DD'
));
const
userNameRules
=
[
const
userNameRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -83,6 +85,7 @@ export default defineComponent({
...
@@ -83,6 +85,7 @@ export default defineComponent({
val
?.
length
||
i18n
.
global
.
t
(
'userPage.validateMessages.requiredGroup'
),
val
?.
length
||
i18n
.
global
.
t
(
'userPage.validateMessages.requiredGroup'
),
];
];
return
{
return
{
today
,
userNameRules
,
userNameRules
,
passwordRules
,
passwordRules
,
fullNameRules
,
fullNameRules
,
...
...
src/components/user-management/add-new-user-dialog/index.vue
View file @
ed8733bc
...
@@ -146,6 +146,10 @@
...
@@ -146,6 +146,10 @@
:model-value=
"birthday"
:model-value=
"birthday"
@
update:model-value=
"$emit('update:birthday', $event)"
@
update:model-value=
"$emit('update:birthday', $event)"
mask=
"DD/MM/YYYY"
mask=
"DD/MM/YYYY"
:options=
"
(birthday) =>
birthday >= '1900/01/01' && birthday
<
=
today
"
>
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
<q-btn
<q-btn
...
...
src/components/user-management/update-user-dialog/UpdateUserDialog.ts
View file @
ed8733bc
import
{
defineComponent
,
PropType
}
from
'vue'
;
import
{
defineComponent
,
PropType
,
ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
{
GroupInfoType
}
from
'src/pages/nhom-nguoi-dung/UserGroup'
;
import
{
GroupInfoType
}
from
'src/pages/nhom-nguoi-dung/UserGroup'
;
import
moment
from
'moment'
;
export
default
defineComponent
({
export
default
defineComponent
({
props
:
{
props
:
{
showDialogUpdate
:
{
showDialogUpdate
:
{
...
@@ -26,6 +26,8 @@ export default defineComponent({
...
@@ -26,6 +26,8 @@ export default defineComponent({
status
:
{
type
:
Boolean
,
required
:
true
},
status
:
{
type
:
Boolean
,
required
:
true
},
},
},
setup
()
{
setup
()
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const
today
=
ref
(
moment
().
format
(
'YYYY/MM/DD'
));
const
fullNameRules
=
[
const
fullNameRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -66,6 +68,7 @@ export default defineComponent({
...
@@ -66,6 +68,7 @@ export default defineComponent({
val
?.
length
||
i18n
.
global
.
t
(
'userPage.validateMessages.requiredGroup'
),
val
?.
length
||
i18n
.
global
.
t
(
'userPage.validateMessages.requiredGroup'
),
];
];
return
{
return
{
today
,
fullNameRules
,
fullNameRules
,
emailRules
,
emailRules
,
mobileNumberRules
,
mobileNumberRules
,
...
...
src/components/user-management/update-user-dialog/index.vue
View file @
ed8733bc
...
@@ -111,6 +111,10 @@
...
@@ -111,6 +111,10 @@
<q-date
<q-date
:model-value=
"birthday"
:model-value=
"birthday"
@
update:model-value=
"$emit('update:birthday', $event)"
@
update:model-value=
"$emit('update:birthday', $event)"
:options=
"
(birthday) =>
birthday >= '1900/01/01' && birthday
<
=
today
"
mask=
"DD/MM/YYYY"
mask=
"DD/MM/YYYY"
>
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment