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
ca5b50f3
Commit
ca5b50f3
authored
May 08, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
561ea8e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
axios.ts
src/boot/axios.ts
+3
-4
index.vue
...components/units-manager/add-update-unit-dialog/index.vue
+3
-3
index.vue
src/pages/don-vi-chu-quan/index.vue
+2
-1
No files found.
src/boot/axios.ts
View file @
ca5b50f3
...
@@ -28,15 +28,13 @@ export type BaseResponseBody<T> = {
...
@@ -28,15 +28,13 @@ export type BaseResponseBody<T> = {
data
:
T
;
data
:
T
;
};
};
export
default
boot
(({
app
,
store
})
=>
{
export
default
boot
<
StateInterface
>
(({
app
,
store
})
=>
{
// for use inside Vue files (Options API) through this.$axios and this.$api
// for use inside Vue files (Options API) through this.$axios and this.$api
const
$store
=
store
as
Store
<
StateInterface
>
;
const
onRequest
=
(
axiosConfig
:
AxiosRequestConfig
)
=>
{
const
onRequest
=
(
axiosConfig
:
AxiosRequestConfig
)
=>
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
axiosConfig
.
headers
.
Authorization
=
`Bearer
${
axiosConfig
.
headers
.
Authorization
=
`Bearer
${
$
store
.
state
.
authentication
.
token
||
''
store
.
state
.
authentication
.
token
||
''
}
`
;
}
`
;
if
(
axiosConfig
.
method
?.
toUpperCase
()
===
'GET'
)
{
if
(
axiosConfig
.
method
?.
toUpperCase
()
===
'GET'
)
{
...
@@ -69,6 +67,7 @@ export default boot(({ app, store }) => {
...
@@ -69,6 +67,7 @@ export default boot(({ app, store }) => {
type
:
'warning'
,
type
:
'warning'
,
message
:
i18n
.
global
.
t
(
'tokenInvalidMessage'
),
message
:
i18n
.
global
.
t
(
'tokenInvalidMessage'
),
});
});
void
store
.
dispatch
(
'authentication/logOut'
);
// ... Logout
// ... Logout
}
else
{
}
else
{
Notify
.
create
({
Notify
.
create
({
...
...
src/components/units-manager/add-update-unit-dialog/index.vue
View file @
ca5b50f3
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
:label=
"$t('managingUnit.dialogLabel.fieldLabels.fields')"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.fields')"
:options=
"fieldsOptions"
:options=
"fieldsOptions"
:rules=
"fieldsRules"
:rules=
"fieldsRules"
emit-valu
e
multipl
e
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"name"
option-label=
"name"
...
@@ -506,8 +506,8 @@ export default defineComponent({
...
@@ -506,8 +506,8 @@ export default defineComponent({
const
addNewArtist
=
()
=>
{
const
addNewArtist
=
()
=>
{
const
newArtistList
=
[...
props
.
artistList
];
const
newArtistList
=
[...
props
.
artistList
];
newArtistList
.
push
({
newArtistList
.
push
({
contractFrom
:
contractTimeFrom
.
value
,
contractFrom
:
`
${
contractTimeFrom
.
value
}
00:00:00`
,
contractTo
:
contractTimeTo
.
value
,
contractTo
:
`
${
contractTimeTo
.
value
}
00:00:00`
,
timeAdd
:
`
${
contractTimeFrom
.
value
}
-
${
contractTimeTo
.
value
}
`
,
timeAdd
:
`
${
contractTimeFrom
.
value
}
-
${
contractTimeTo
.
value
}
`
,
status
:
artistStatus
.
value
,
status
:
artistStatus
.
value
,
artistId
:
artistName
.
value
?.
id
,
artistId
:
artistName
.
value
?.
id
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
ca5b50f3
...
@@ -384,7 +384,7 @@ export default defineComponent({
...
@@ -384,7 +384,7 @@ export default defineComponent({
phoneNumber
:
unitPhoneNumber
.
value
,
phoneNumber
:
unitPhoneNumber
.
value
,
status
:
unitStatus
.
value
?
1
:
2
,
status
:
unitStatus
.
value
?
1
:
2
,
fields
:
unitField
.
value
,
fields
:
unitField
.
value
,
artistList
:
unitArtistList
.
value
,
contracts
:
unitArtistList
.
value
,
};
};
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
artistOwnerAdd
,
url
:
API_PATHS
.
artistOwnerAdd
,
...
@@ -392,6 +392,7 @@ export default defineComponent({
...
@@ -392,6 +392,7 @@ export default defineComponent({
data
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistOwnerAdd
[]
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistOwnerAdd
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
addUnitDialogIsOpened
.
value
=
false
;
Notify
.
create
({
Notify
.
create
({
type
:
'positive'
,
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
message
:
i18n
.
global
.
t
(
...
...
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