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
9dc0c804
Commit
9dc0c804
authored
Nov 30, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2c1fc2ab
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
495 additions
and
28 deletions
+495
-28
index.vue
src/components/artist-information/UpdateHotProduct/index.vue
+22
-0
updateHotProduc.ts
...ts/artist-information/UpdateHotProduct/updateHotProduc.ts
+10
-0
HotProduct.ts
src/components/artist-information/hot-product/HotProduct.ts
+46
-0
index.vue
src/components/artist-information/hot-product/index.vue
+27
-0
AddNewUserDialog.ts
...s/user-management/add-new-user-dialog/AddNewUserDialog.ts
+2
-6
index.vue
src/components/user-management/add-new-user-dialog/index.vue
+0
-1
index.ts
src/i18n/vi/index.ts
+1
-1
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+2
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+2
-0
index.vue
src/pages/cau-hinh-trang-chu/index.vue
+367
-8
User.ts
src/pages/nguoi-dung/User.ts
+14
-12
index.vue
src/pages/them-nghe-sy/index.vue
+2
-0
No files found.
src/components/artist-information/UpdateHotProduct/index.vue
View file @
9dc0c804
...
...
@@ -88,6 +88,28 @@
:rules=
"statusRules"
hide-bottom-space
></q-select>
<!--
<q-select
v-model=
"homeStatus"
emit-value
label=
"Nổi bật ở trang chủ"
class=
"q-my-sm"
:options=
"statusHomeOptions"
option-value=
"id"
option-label=
"name"
outlined
map-options
hide-bottom-space
></q-select>
-->
<!--
<div
class=
"q-pt-sm"
>
<span
class=
"text-body1"
>
Nổi bật ở trang chủ
</span
><q-toggle
:model-value=
"homeStatus"
:true-value=
"1"
:false-value=
"2"
/>
</div>
-->
</div>
</div>
</q-card-section>
...
...
src/components/artist-information/UpdateHotProduct/updateHotProduc.ts
View file @
9dc0c804
...
...
@@ -29,10 +29,15 @@ export default defineComponent({
const
urlFileLocal
:
Ref
<
string
>
=
ref
(
''
);
const
imageAPI
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
>
=
ref
(
2
);
// const homeStatus: Ref<number> = ref(0);
const
statusOptions
=
ref
([
{
id
:
1
,
name
:
'Sản phẩm khác'
},
{
id
:
2
,
name
:
'Sản phẩm nổi bật'
},
]);
// const statusHomeOptions = ref([
// { id: 0, name: 'Hiển thị' },
// { id: 1, name: 'Ẩn' },
// ])
const
id
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
uploadAvatar
=
(
value
:
FileList
)
=>
{
urlFileLocal
.
value
=
URL
.
createObjectURL
(
value
[
0
]);
...
...
@@ -49,6 +54,7 @@ export default defineComponent({
code
.
value
=
props
.
dataUpdate
?.
code
as
string
;
embeddedUrl
.
value
=
props
.
dataUpdate
?.
embeddedUrl
as
string
;
status
.
value
=
props
.
dataUpdate
?.
status
as
number
;
// homeStatus.value = props.dataUpdate?.status as number
urlFileLocal
.
value
=
props
.
dataUpdate
?.
imageUrl
as
string
;
if
(
props
.
dataUpdate
?.
file
)
{
imageAPI
.
value
=
null
;
...
...
@@ -67,6 +73,7 @@ export default defineComponent({
embeddedUrl
.
value
=
''
;
urlFileLocal
.
value
=
''
;
status
.
value
=
2
;
// homeStatus.value = 0
};
const
SubbmitDataUpdate
=
()
=>
{
context
.
emit
(
'click:CloseBtnUpdateHotProduct'
);
...
...
@@ -75,6 +82,7 @@ export default defineComponent({
name
:
name
.
value
,
code
:
code
.
value
,
status
:
status
.
value
,
// isFeaturedOnHomepage: homeStatus.value,
embeddedUrl
:
embeddedUrl
.
value
,
imageUrl
:
urlFileLocal
.
value
,
id
:
id
.
value
,
...
...
@@ -131,6 +139,8 @@ export default defineComponent({
url_embed
,
statusRules
,
statusOptions
,
// statusHomeOptions,
// homeStatus,
id
,
configImg
,
imageAPI
,
...
...
src/components/artist-information/hot-product/HotProduct.ts
View file @
9dc0c804
...
...
@@ -4,6 +4,7 @@ import Pagination from 'components/pagination/index.vue';
import
{
ProductType
}
from
'src/assets/type'
;
import
{
HotProductStatus
}
from
'src/assets/enums'
;
import
{
config
}
from
'src/assets/configurations.example'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
default
defineComponent
({
components
:
{
Pagination
,
...
...
@@ -13,6 +14,7 @@ export default defineComponent({
// DataInsertHotProduct: { type: Object, requied: false }
},
setup
(
_
,
context
)
{
const
configImg
=
config
;
const
userTableColumnsHotProduct
=
[
{
...
...
@@ -61,6 +63,16 @@ export default defineComponent({
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'isFeaturedOnHomepage'
,
field
:
'isFeaturedOnHomepage'
,
required
:
true
,
label
:
'Nổi bật ở trang chủ'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
...
...
@@ -75,6 +87,7 @@ export default defineComponent({
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
10
);
const
updateProduct
=
(
item
:
{
row
:
ProductType
})
=>
{
context
.
emit
(
'setDataUpdate'
,
{
code
:
item
.
row
.
code
,
...
...
@@ -86,7 +99,37 @@ export default defineComponent({
file
:
item
.
row
.
file
,
});
context
.
emit
(
'click:openUpdateHotProduct'
);
};
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const
showHiden
=
(
index
:
any
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'managingUnit.confirmActionsTitle.confirmDeleteManagingUnitsTitle'
),
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
message
:
index
.
isFeaturedOnHomepage
===
1
?
'Bạn có chắc chắn muốn ẩn ở trang chủ không?'
:
'Bạn có chắc chắn muốn hiển thị ở trang chủ không?'
,
cancel
:
i18n
.
global
.
t
(
'managingUnit.confirmActionsTitle.confirmDeleteManagingUnitsCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
context
.
emit
(
'click:updateStatusHot'
);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
console
.
log
(
index
.
id
,
'index'
)
Notify
.
create
({
type
:
'positive'
,
message
:
'Thay đổi trạng thái thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
});
}
const
clickAdd
=
()
=>
{
context
.
emit
(
'click:addHotProduct'
);
};
...
...
@@ -104,7 +147,9 @@ export default defineComponent({
deleteRow
,
clickAdd
,
updateProduct
,
showHiden
,
HotProductStatus
,
};
},
emits
:
[
...
...
@@ -113,5 +158,6 @@ export default defineComponent({
'deleteRow'
,
'click:openUpdateHotProduct'
,
'setDataUpdate'
,
'click:updateStatusHot'
],
});
src/components/artist-information/hot-product/index.vue
View file @
9dc0c804
...
...
@@ -50,6 +50,20 @@
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-isFeaturedOnHomepage=
"rowData"
>
<q-td>
<div
v-if=
"rowData.value === 1"
align=
"center"
>
<q-chip
color=
" positive"
text-color=
"white"
size=
"sm"
>
Hiển thị
</q-chip>
</div>
<div
v-if=
"rowData.value === 0"
align=
"center"
>
<q-chip
color=
"primary"
text-color=
"white"
size=
"sm"
>
Ẩn
</q-chip>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-STT=
"item"
>
<q-td
:item=
"item"
style=
"text-align: center"
>
{{
1
+
item
.
rowIndex
+
pageSize
*
(
pageIndex
-
1
)
}}
...
...
@@ -59,6 +73,19 @@
<
template
v-slot:body-cell-action=
"item"
>
<q-td
style=
"padding: 0; height: 100%"
>
<div
align=
"center"
>
<q-btn
flat
round
color=
"primary"
:icon=
"
item.row.isFeaturedOnHomepage === 0
? 'mdi-eye-off-outline'
: 'mdi-eye-outline'
"
@
click=
"showHiden(item.row)"
>
<q-tooltip>
Nổi bật ở trang chủ
</q-tooltip>
</q-btn>
<q-btn
flat
round
...
...
src/components/user-management/add-new-user-dialog/AddNewUserDialog.ts
View file @
9dc0c804
...
...
@@ -75,11 +75,7 @@ export default defineComponent({
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'userPage.validateMessages.requireUnit'
),
];
const
sexRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'userPage.validateMessages.requireSex'
),
];
const
groupRules
=
[
(
val
?:
Array
<
unknown
>
)
=>
val
?.
length
||
i18n
.
global
.
t
(
'userPage.validateMessages.requiredGroup'
),
...
...
@@ -94,7 +90,7 @@ export default defineComponent({
mobileNumberRules
,
addressRules
,
unitRules
,
sexRules
,
groupRules
,
birthdayRules
,
};
...
...
src/components/user-management/add-new-user-dialog/index.vue
View file @
9dc0c804
...
...
@@ -119,7 +119,6 @@
option-label=
"text"
outlined
map-options
:rules=
"sexRules"
hide-bottom-space
></q-select>
<q-input
...
...
src/i18n/vi/index.ts
View file @
9dc0c804
...
...
@@ -97,7 +97,7 @@ export default {
address
:
'Địa chỉ'
,
phoneNumber
:
'Số máy bàn'
,
unit
:
'Đơn vị phòng ban'
,
sex
:
'Giới tính
*
'
,
sex
:
'Giới tính'
,
birthday
:
'Ngày sinh'
,
group
:
'Thuộc nhóm *'
,
scheduleAccess
:
'Lịch truy cập'
,
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
9dc0c804
...
...
@@ -136,6 +136,7 @@
@
click:addHotProduct=
"openAddHotProduct = true"
@
click:openUpdateHotProduct=
"openUpdateHotProduct = true"
@
setDataUpdate=
"SetProduct($event)"
@
click:update-status-hot=
"getInformationArtist"
></HotProduct>
</q-tab-panel>
</q-tab-panels>
...
...
@@ -179,6 +180,7 @@
@
UpdateData=
"UpdateData($event)"
@
click:CloseBtnUpdateHotProduct=
"openUpdateHotProduct = false"
v-model:open-update-hot-product=
"openUpdateHotProduct"
></UpdateHotProduct>
<AddStory
@
insertData=
"addStory"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
9dc0c804
...
...
@@ -345,6 +345,7 @@ export default defineComponent({
// }
// );
const
getInformationArtist
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getDetailArtist
,
...
...
@@ -1054,6 +1055,7 @@ export default defineComponent({
confirmDeleteRow
,
updateInformationArtist
,
openUpdateHotProduct
,
SetProduct
,
DataUpdateHotProduct
,
UpdateData
,
...
...
src/pages/cau-hinh-trang-chu/index.vue
View file @
9dc0c804
This diff is collapsed.
Click to expand it.
src/pages/nguoi-dung/User.ts
View file @
9dc0c804
...
...
@@ -97,11 +97,11 @@ export default defineComponent({
const
userName
=
ref
(
''
);
const
password
=
ref
(
''
);
const
fullName
=
ref
(
''
);
const
birthday
:
Ref
<
string
|
undefined
>
=
ref
(
);
const
birthday
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
=
ref
(
''
);
const
phoneNumber
=
ref
(
''
);
const
mobileNumber
=
ref
(
''
);
const
sex
:
Ref
<
number
|
undefined
>
=
ref
(
);
const
sex
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
sexOptions
=
ref
([
{
id
:
1
,
text
:
'Nam'
},
{
id
:
2
,
text
:
'Nữ'
},
...
...
@@ -157,18 +157,19 @@ export default defineComponent({
userName
.
value
=
''
;
password
.
value
=
''
;
fullName
.
value
=
''
;
birthday
.
value
=
''
;
birthday
.
value
=
null
;
email
.
value
=
''
;
phoneNumber
.
value
=
''
;
mobileNumber
.
value
=
''
;
sex
.
value
=
undefined
;
sex
.
value
=
null
;
address
.
value
=
''
;
unit
.
value
=
null
;
status
.
value
=
true
;
group
.
value
=
[];
};
const
addNewUser
=
async
()
=>
{
const
addNewUser
=
async
()
=>
{
try
{
const
groups
:
{
id
:
number
}[]
=
[];
group
.
value
.
map
((
item
)
=>
{
...
...
@@ -183,11 +184,11 @@ export default defineComponent({
password
:
password
.
value
,
fullName
:
fullName
.
value
.
trim
(),
birthday
:
birthday
.
value
===
''
?
''
:
moment
(
birthday
.
value
,
'DD/MM/YYYY'
).
format
(
'DD/MM/YYYY 00:00:00'
),
birthday
.
value
===
null
?
null
:
moment
(
birthday
.
value
,
'DD/MM/YYYY'
).
format
(
'DD/MM/YYYY 00:00:00'
),
email
:
email
.
value
.
trim
(),
phoneNumber
:
phoneNumber
.
value
.
trim
(),
mobileNumber
:
mobileNumber
.
value
.
trim
(),
sex
:
sex
.
value
,
sex
:
sex
.
value
===
null
?
null
:
sex
.
value
,
address
:
address
.
value
?.
trim
(),
unit
:
unit
.
value
?.
trim
(),
status
:
status
.
value
?
1
:
0
,
...
...
@@ -319,20 +320,21 @@ export default defineComponent({
'DD/MM/YYYY HH:mm:ss'
).
format
(
'DD/MM/YYYY'
);
}
else
{
birthday
.
value
=
''
;
birthday
.
value
=
null
;
}
email
.
value
=
userInfo
.
email
as
string
;
fullName
.
value
=
userInfo
.
fullName
as
string
;
mobileNumber
.
value
=
userInfo
.
mobileNumber
as
string
;
phoneNumber
.
value
=
userInfo
.
phoneNumber
as
string
;
if
(
userInfo
.
sex
!==
0
)
{
if
(
userInfo
.
sex
!==
null
)
{
sex
.
value
=
userInfo
.
sex
;
}
else
{
sex
.
value
=
1
;
sex
.
value
=
null
;
}
status
.
value
=
userInfo
.
status
?
true
:
false
;
unit
.
value
=
userInfo
.
unit
;
userName
.
value
=
userInfo
.
userName
;
password
.
value
=
userInfo
.
password
}
}
catch
(
error
)
{}
};
...
...
@@ -350,11 +352,11 @@ export default defineComponent({
fullName
:
fullName
.
value
.
trim
(),
birthday
:
birthday
.
value
===
''
?
''
:
moment
(
birthday
.
value
,
'DD/MM/YYYY'
).
format
(
'DD/MM/YYYY 00:00:00'
),
birthday
.
value
===
null
?
null
:
moment
(
birthday
.
value
,
'DD/MM/YYYY'
).
format
(
'DD/MM/YYYY 00:00:00'
),
email
:
email
.
value
.
trim
(),
phoneNumber
:
phoneNumber
.
value
.
trim
(),
mobileNumber
:
mobileNumber
.
value
.
trim
(),
sex
:
sex
.
value
,
sex
:
sex
.
value
===
null
?
null
:
sex
.
value
,
address
:
address
.
value
?.
trim
(),
unit
:
unit
.
value
?.
trim
(),
status
:
status
.
value
?
1
:
0
,
...
...
src/pages/them-nghe-sy/index.vue
View file @
9dc0c804
...
...
@@ -192,6 +192,8 @@
@
UpdateData=
"UpdateData($event)"
@
click:CloseBtnUpdateHotProduct=
"openUpdateHotProduct = false"
v-model:open-update-hot-product=
"openUpdateHotProduct"
></UpdateHotProduct>
<AddStory
@
insertData=
"addStory"
...
...
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