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
6a078ad2
Commit
6a078ad2
authored
Jun 30, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1c90e72f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1017 additions
and
245 deletions
+1017
-245
configurations.example.ts
src/assets/configurations.example.ts
+2
-0
openDialogRefusedBrowser.vue
src/components/booking/openDialogRefusedBrowser.vue
+109
-0
browser-new-customer-dialog.vue
src/components/customer/browser-new-customer-dialog.vue
+181
-181
openDialogRefusedBrowser.vue
src/components/customer/openDialogRefusedBrowser.vue
+4
-4
index.vue
src/pages/danh-sach-booking-cho-duyet/index.vue
+647
-0
index.vue
src/pages/khach-hang-cho-duyet/index.vue
+33
-35
index.vue
src/pages/khach-hang/index.vue
+34
-24
index.vue
src/pages/nghe-si-cho-duyet/index.vue
+1
-1
routes.ts
src/router/routes.ts
+6
-0
No files found.
src/assets/configurations.example.ts
View file @
6a078ad2
...
@@ -128,4 +128,6 @@ export enum API_PATHS {
...
@@ -128,4 +128,6 @@ export enum API_PATHS {
getListRegister
=
'artist/getListRegister'
,
getListRegister
=
'artist/getListRegister'
,
accountArtistBrowsing
=
'customer/accountArtistBrowsing'
,
accountArtistBrowsing
=
'customer/accountArtistBrowsing'
,
detailRegisterArtist
=
'artist/detailRegister'
,
detailRegisterArtist
=
'artist/detailRegister'
,
listBookingNotApproval
=
'booking/notApproval'
,
bookingBrowsing
=
'booking/bookingBrowsing'
}
}
src/components/booking/openDialogRefusedBrowser.vue
0 → 100644
View file @
6a078ad2
<
template
>
<q-dialog
persistent
:model-value=
"openDialogRefusedBrowser"
>
<q-card
style=
"min-width: 900px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"confirmRefusedCustomer"
>
<q-card-section
style=
"padding-bottom: 10px"
>
<q-item
style=
"padding-left: 10px"
>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
Lý do
</q-item-label
>
</q-item-section>
</q-item>
</q-card-section>
<q-card-section
style=
"padding-top: 0px"
>
<q-input
outlined
hide-bottom-space
:rules=
"contentRules"
v-model=
"content"
label=
"Nội dung"
type=
"textarea"
/>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
label=
"Hủy"
@
click=
"$emit('click:CloseBtn')"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
label=
"Ok"
/>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
emit
}
from
'cluster'
;
export
default
defineComponent
({
props
:
{
openDialogRefusedBrowser
:
{
type
:
Boolean
,
required
:
true
,
},
id
:
{
type
:
Number
,
required
:
true
,
},
},
setup
(
props
,
context
)
{
watch
(
()
=>
props
.
openDialogRefusedBrowser
,
(
value
)
=>
{
if
(
value
)
{
content
.
value
=
null
;
}
}
);
const
content
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
contentRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
'Vui lòng nhập nội dung'
,
];
const
confirmRefusedCustomer
=
async
()
=>
{
try
{
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
bookingBrowsing
,
method
:
'POST'
,
data
:
{
id
:
props
.
id
,
approvalStatus
:
2
,
reason
:
content
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
browserResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
'Từ chối duyệt thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
context
.
emit
(
'editReCustomer'
);
context
.
emit
(
'click:CloseBtn'
);
}
}
catch
(
error
)
{}
};
return
{
contentRules
,
content
,
confirmRefusedCustomer
,
};
},
emits
:
[
'click:CloseBtn'
,
'editReCustomer'
],
});
</
script
>
src/components/customer/browser-new-customer-dialog.vue
View file @
6a078ad2
This diff is collapsed.
Click to expand it.
src/components/customer/openDialogRefusedBrowser.vue
View file @
6a078ad2
...
@@ -56,7 +56,7 @@ export default defineComponent({
...
@@ -56,7 +56,7 @@ export default defineComponent({
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
customerI
d
:
{
i
d
:
{
type
:
Number
,
type
:
Number
,
required
:
true
,
required
:
true
,
},
},
...
@@ -78,11 +78,11 @@ export default defineComponent({
...
@@ -78,11 +78,11 @@ export default defineComponent({
const
confirmRefusedCustomer
=
async
()
=>
{
const
confirmRefusedCustomer
=
async
()
=>
{
try
{
try
{
const
browserResult
=
(
await
api
({
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
customerNot
Browsing
,
url
:
API_PATHS
.
booking
Browsing
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
id
:
props
.
customerI
d
,
id
:
props
.
i
d
,
isCustomer
:
1
,
approvalStatus
:
2
,
approvalStatus
:
2
,
reason
:
content
.
value
,
reason
:
content
.
value
,
},
},
...
...
src/pages/danh-sach-booking-cho-duyet/index.vue
0 → 100644
View file @
6a078ad2
This diff is collapsed.
Click to expand it.
src/pages/khach-hang-cho-duyet/index.vue
View file @
6a078ad2
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
$t
(
'customer.toolTipMessage.updateCustomerInfo'
)
$t
(
'customer.toolTipMessage.updateCustomerInfo'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
-->
</q-btn>
-->
<q-btn
<q-btn
flat
flat
round
round
color=
"primary"
color=
"primary"
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
>
>
<q-tooltip
:offset=
"[20, 10]"
>
Duyệt
</q-tooltip>
<q-tooltip
:offset=
"[20, 10]"
>
Duyệt
</q-tooltip>
</q-btn>
</q-btn>
<q-btn
<q-btn
v-if=
"rowData.row.approvalStatus === 0"
v-if=
"rowData.row.approvalStatus === 0"
flat
flat
round
round
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
icon=
"mdi-block-helper"
icon=
"mdi-block-helper"
@
click=
"confirmRefusedBrowserCustomer(rowData.row.id)"
@
click=
"confirmRefusedBrowserCustomer(rowData.row.id)"
>
>
<q-tooltip
>
Từ chối
</q-tooltip>
<q-tooltip>
Từ chối
</q-tooltip>
</q-btn>
</q-btn>
<!--
<q-btn
<!--
<q-btn
flat
flat
...
@@ -143,23 +143,23 @@
...
@@ -143,23 +143,23 @@
<
template
v-slot:body-cell-approvalStatus=
"rowData"
>
<
template
v-slot:body-cell-approvalStatus=
"rowData"
>
<q-td>
<q-td>
<div
align=
"center"
>
<div
align=
"center"
>
<q-chip
<q-chip
v-if=
"rowData.value === 0"
v-if=
"rowData.value === 0"
color=
'orange'
color=
"orange"
text-color=
"white"
text-color=
"white"
size=
"sm"
size=
"sm"
>
>
Chưa duyệt
Chưa duyệt
</q-chip>
</q-chip>
<q-chip
<q-chip
v-if=
"rowData.value === 2"
v-if=
"rowData.value === 2"
color=
"red"
color=
"red"
text-color=
"white"
text-color=
"white"
size=
"sm"
size=
"sm"
>
>
Từ chối duyệt
Từ chối duyệt
</q-chip>
</q-chip>
</div>
</div>
</q-td>
</q-td>
</
template
>
</
template
>
...
@@ -189,14 +189,13 @@
...
@@ -189,14 +189,13 @@
@
editCustomer=
"updateCustomer"
@
editCustomer=
"updateCustomer"
></UpdateNewCustomerDialogComponent>
></UpdateNewCustomerDialogComponent>
<RefusedBrowserCustomer
<RefusedBrowserCustomer
:customer-id=
"customerId"
:customer-id=
"customerId"
v-model:open-dialog-refused-browser=
"openDialogRefusedBrowser"
v-model:open-dialog-refused-browser=
"openDialogRefusedBrowser"
@
click:CloseBtn=
"openDialogRefusedBrowser = false"
@
click:CloseBtn=
"openDialogRefusedBrowser = false"
@
editReCustomer=
"getListCustomers"
@
editReCustomer=
"getListCustomers"
>
>
</RefusedBrowserCustomer>
</RefusedBrowserCustomer>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -208,7 +207,7 @@ import { defineComponent, onMounted, Ref, ref } from 'vue';
...
@@ -208,7 +207,7 @@ import { defineComponent, onMounted, Ref, ref } from 'vue';
import
Pagination
from
'components/pagination/index.vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
// import AddNewCustomerDialogComponent from '../../components/customer/add-new-customer-dialog/index.vue';
// import AddNewCustomerDialogComponent from '../../components/customer/add-new-customer-dialog/index.vue';
import
UpdateNewCustomerDialogComponent
from
'../../components/customer/browser-new-customer-dialog.vue'
;
import
UpdateNewCustomerDialogComponent
from
'../../components/customer/browser-new-customer-dialog.vue'
;
import
RefusedBrowserCustomer
from
'../../components/customer/openDialogRefusedBrowser.vue'
import
RefusedBrowserCustomer
from
'../../components/customer/openDialogRefusedBrowser.vue'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
...
@@ -307,11 +306,11 @@ export default defineComponent({
...
@@ -307,11 +306,11 @@ export default defineComponent({
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'approvalStatus'
,
name
:
'approvalStatus'
,
field
:
'approvalStatus'
,
field
:
'approvalStatus'
,
required
:
true
,
required
:
true
,
label
:
'T.
thái d
uyệt'
,
label
:
'T.
T D
uyệt'
,
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
},
},
...
@@ -399,11 +398,10 @@ export default defineComponent({
...
@@ -399,11 +398,10 @@ export default defineComponent({
// });
// });
// };
// };
const
confirmRefusedBrowserCustomer
=
(
id
:
number
)
=>
{
const
confirmRefusedBrowserCustomer
=
(
id
:
number
)
=>
{
customerId
.
value
=
id
customerId
.
value
=
id
;
openDialogRefusedBrowser
.
value
=
true
openDialogRefusedBrowser
.
value
=
true
;
}
};
// const deleteCustomer = async (id: number) => {
// const deleteCustomer = async (id: number) => {
// try {
// try {
...
@@ -539,12 +537,12 @@ export default defineComponent({
...
@@ -539,12 +537,12 @@ export default defineComponent({
void
getCustomerLevelOptions
();
void
getCustomerLevelOptions
();
});
});
return
{
return
{
// openUpdateCustomerDialog,
// openUpdateCustomerDialog,
updateCustomer
,
updateCustomer
,
// openAddCustomerDialog,
// openAddCustomerDialog,
// addCustomer,
// addCustomer,
showDialogUpdate
,
showDialogUpdate
,
// showDialog,
// showDialog,
openDialogRefusedBrowser
,
openDialogRefusedBrowser
,
id
,
id
,
userName
,
userName
,
...
@@ -574,11 +572,11 @@ export default defineComponent({
...
@@ -574,11 +572,11 @@ export default defineComponent({
totalPage
,
totalPage
,
changePageSize
,
changePageSize
,
getCustomerLevelOptions
,
getCustomerLevelOptions
,
// confirmDeleteCustomer,
// confirmDeleteCustomer,
confirmBrowserCustomer
,
confirmBrowserCustomer
,
customerInfo
,
customerInfo
,
customerId
,
customerId
,
confirmRefusedBrowserCustomer
confirmRefusedBrowserCustomer
,
};
};
},
},
});
});
...
...
src/pages/khach-hang/index.vue
View file @
6a078ad2
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
$t
(
'customer.toolTipMessage.updateCustomerInfo'
)
$t
(
'customer.toolTipMessage.updateCustomerInfo'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
<!--
<q-btn
<!--
<q-btn
flat
flat
round
round
color=
"primary"
color=
"primary"
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
>
>
<q-tooltip
:offset=
"[20, 10]"
>
Duyệt tài khoản
</q-tooltip>
<q-tooltip
:offset=
"[20, 10]"
>
Duyệt tài khoản
</q-tooltip>
</q-btn>
-->
</q-btn>
-->
<!--
<q-btn
<!--
<q-btn
flat
flat
round
round
color=
"primary"
color=
"primary"
...
@@ -137,7 +137,20 @@
...
@@ -137,7 +137,20 @@
</div>
</div>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:body-cell-approvalStatus=
"rowData"
>
<q-td>
<div
align=
"center"
>
<q-chip
v-if=
"rowData.value === 1"
color=
"positive"
text-color=
"white"
size=
"sm"
>
Duyệt
</q-chip>
</div>
</q-td>
</
template
>
<!-- <template v-slot:body-cell-approvalStatus="rowData">
<!-- <template v-slot:body-cell-approvalStatus="rowData">
<q-td>
<q-td>
<div align="center">
<div align="center">
...
@@ -188,7 +201,6 @@
...
@@ -188,7 +201,6 @@
@editReCustomer="getListCustomers"
@editReCustomer="getListCustomers"
>
>
</RefusedBrowserCustomer> -->
</RefusedBrowserCustomer> -->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -299,7 +311,7 @@ export default defineComponent({
...
@@ -299,7 +311,7 @@ export default defineComponent({
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'approvalStatus'
,
name
:
'approvalStatus'
,
field
:
'approvalStatus'
,
field
:
'approvalStatus'
,
required
:
true
,
required
:
true
,
...
@@ -391,8 +403,8 @@ export default defineComponent({
...
@@ -391,8 +403,8 @@ export default defineComponent({
void
deleteCustomer
(
id
);
void
deleteCustomer
(
id
);
});
});
};
};
const
confirmBrowserCustomer
=
(
id
:
number
)
=>
{
const
confirmBrowserCustomer
=
(
id
:
number
)
=>
{
Dialog
.
create
({
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
title
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserTitle'
'customer.confirmActionsTitle.confirmDeleteUserTitle'
),
),
...
@@ -400,29 +412,29 @@ export default defineComponent({
...
@@ -400,29 +412,29 @@ export default defineComponent({
// i18n.global.t(
// i18n.global.t(
// 'customer.confirmActionsTitle.confirmDeleteUserContent'
// 'customer.confirmActionsTitle.confirmDeleteUserContent'
// ),
// ),
cancel
:
i18n
.
global
.
t
(
cancel
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserCancelBtnLabel'
'customer.confirmActionsTitle.confirmDeleteUserCancelBtnLabel'
),
),
color
:
'secondary'
,
color
:
'secondary'
,
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
// void deleteCustomer(id);
// void deleteCustomer(id);
void
browserCustomer
(
id
);
void
browserCustomer
(
id
);
});
});
};
};
const
confirmRefusedBrowserCustomer
=
(
id
:
number
)
=>
{
const
confirmRefusedBrowserCustomer
=
(
id
:
number
)
=>
{
customerId
.
value
=
id
customerId
.
value
=
id
;
openDialogRefusedBrowser
.
value
=
true
openDialogRefusedBrowser
.
value
=
true
;
}
};
const
browserCustomer
=
async
(
id
:
number
)
=>
{
const
browserCustomer
=
async
(
id
:
number
)
=>
{
try
{
try
{
const
browserResult
=
(
await
api
({
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
browserCustomer
,
url
:
API_PATHS
.
browserCustomer
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
id
:
id
,
id
:
id
,
isCustomer
:
1
,
isCustomer
:
1
,
approvalStatus
:
1
approvalStatus
:
1
,
},
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
...
@@ -433,11 +445,9 @@ export default defineComponent({
...
@@ -433,11 +445,9 @@ export default defineComponent({
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
});
void
getListCustomers
();
void
getListCustomers
();
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{}
};
}
}
const
deleteCustomer
=
async
(
id
:
number
)
=>
{
const
deleteCustomer
=
async
(
id
:
number
)
=>
{
try
{
try
{
...
@@ -612,7 +622,7 @@ export default defineComponent({
...
@@ -612,7 +622,7 @@ export default defineComponent({
confirmBrowserCustomer
,
confirmBrowserCustomer
,
customerInfo
,
customerInfo
,
customerId
,
customerId
,
confirmRefusedBrowserCustomer
confirmRefusedBrowserCustomer
,
};
};
},
},
});
});
...
...
src/pages/nghe-si-cho-duyet/index.vue
View file @
6a078ad2
...
@@ -374,7 +374,7 @@ export default defineComponent({
...
@@ -374,7 +374,7 @@ export default defineComponent({
name
:
'approvalStatus'
,
name
:
'approvalStatus'
,
field
:
'approvalStatus'
,
field
:
'approvalStatus'
,
required
:
true
,
required
:
true
,
label
:
'T.T
hái chờ d
uyệt'
,
label
:
'T.T
D
uyệt'
,
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
...
...
src/router/routes.ts
View file @
6a078ad2
...
@@ -22,6 +22,7 @@ export enum Pages {
...
@@ -22,6 +22,7 @@ export enum Pages {
infoVAB
=
'thong-tin-chung'
,
infoVAB
=
'thong-tin-chung'
,
menu
=
'menu'
,
menu
=
'menu'
,
listBooking
=
'danh-sach-booking'
,
listBooking
=
'danh-sach-booking'
,
listBookingBrowsing
=
'danh-sach-booking-cho-duyet'
,
work
=
'cong-viec'
,
work
=
'cong-viec'
,
configSystem
=
'cau-hinh-trang-tinh'
,
configSystem
=
'cau-hinh-trang-tinh'
,
news
=
'cau-hinh-tin-tuc'
,
news
=
'cau-hinh-tin-tuc'
,
...
@@ -134,6 +135,11 @@ const routes: RouteRecordRaw[] = [
...
@@ -134,6 +135,11 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/danh-sach-booking/index.vue'
),
component
:
()
=>
import
(
'pages/danh-sach-booking/index.vue'
),
name
:
Pages
.
listBooking
,
name
:
Pages
.
listBooking
,
},
},
{
path
:
'danh-sach-booking-cho-duyet'
,
component
:
()
=>
import
(
'pages/danh-sach-booking-cho-duyet/index.vue'
),
name
:
Pages
.
listBookingBrowsing
,
},
{
{
path
:
'cong-viec'
,
path
:
'cong-viec'
,
component
:
()
=>
import
(
'pages/cong-viec/index.vue'
),
component
:
()
=>
import
(
'pages/cong-viec/index.vue'
),
...
...
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