Merge branch 'develop' into dev
Some checks failed
Build & Deploy on Dev / build (push) Failing after 2m14s
Some checks failed
Build & Deploy on Dev / build (push) Failing after 2m14s
This commit is contained in:
commit
0252d7d7f2
1 changed files with 15 additions and 3 deletions
|
|
@ -695,7 +695,7 @@ function closeImage() {
|
||||||
* ฟังก์ชันยืนยันการลบรูป
|
* ฟังก์ชันยืนยันการลบรูป
|
||||||
* @param id รูปภาพ
|
* @param id รูปภาพ
|
||||||
*/
|
*/
|
||||||
function deletePhoto(id: string) {
|
function deletePhoto(id: string, isActive: boolean) {
|
||||||
dialogRemove(
|
dialogRemove(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -706,6 +706,10 @@ function deletePhoto(id: string) {
|
||||||
.delete(config.API.orgProfileAvatarbyType(empType.value) + `/${id}`)
|
.delete(config.API.orgProfileAvatarbyType(empType.value) + `/${id}`)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await getImage();
|
await getImage();
|
||||||
|
if (isActive) {
|
||||||
|
activeImage.value = null;
|
||||||
|
await fetchDataPersonal();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -1215,13 +1219,16 @@ onMounted(async () => {
|
||||||
icon="delete"
|
icon="delete"
|
||||||
unelevated
|
unelevated
|
||||||
dense
|
dense
|
||||||
@click="deletePhoto(n.id)"
|
@click="deletePhoto(n.id, n.isActive)"
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
style="color: #ff8080"
|
style="color: #ff8080"
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบรูปภาพ</q-tooltip>
|
<q-tooltip>ลบรูปภาพ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="absolute-top-right" v-if="n.isActive">
|
||||||
|
<q-icon name="star" color="yellow" size="24px" />
|
||||||
|
</div>
|
||||||
</q-img>
|
</q-img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1229,7 +1236,12 @@ onMounted(async () => {
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn @click="selectAvatarHistory" color="public" label="เลือกรูปภาพ">
|
<q-btn
|
||||||
|
@click="selectAvatarHistory"
|
||||||
|
color="public"
|
||||||
|
label="เลือกรูปภาพ"
|
||||||
|
:disable="images.length == 0"
|
||||||
|
>
|
||||||
<q-tooltip>เลือกรูปภาพ</q-tooltip>
|
<q-tooltip>เลือกรูปภาพ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue