เเก้ไขเปลี่ยนหน้าเเล้วส่งข้อความไม่ได้

This commit is contained in:
Net 2024-02-16 16:20:19 +07:00
parent 3c5d0aee27
commit aa9b5189d1
3 changed files with 27 additions and 9 deletions

View file

@ -12,7 +12,7 @@ const content = ref<string>("");
const searchInput = ref<string>("");
const currentIssuePage = ref<number>(1);
const totalPageIssue = ref<number>();
const createdByUser = ref<string>("");
const { scrollContainer } = storeToRefs(store);
function dateIssue(timestamp: string): string {
@ -43,6 +43,9 @@ function getOnlineStatus(option: "icon" | "status", userId: string) {
}
onMounted(async () => {
if (store.currentIssue) {
await store.fetchIssue();
}
await store.fetchIssue();
totalPageIssue.value = Math.ceil((store.currentTotalIssue || 0) / 30);
});
@ -66,8 +69,9 @@ const onLoad = (async (_: any, done: any) => {
size="16px"
color="primary"
class="button-link-no-deco q-px-md"
@click="$router.push('/support/category')"
>
<router-link to="/support/category"> ดการประเภทของปญหา </router-link>
ดการประเภทของปญหา
</q-btn>
</p>
</div>
@ -112,9 +116,9 @@ const onLoad = (async (_: any, done: any) => {
<q-icon
name="mdi-circle"
size="10px"
:color="getOnlineStatus('icon', createdByUser)"
:color="getOnlineStatus('icon', store.createdByUser)"
/>
{{ getOnlineStatus("status", createdByUser) }}
{{ getOnlineStatus("status", store.createdByUser) }}
</span>
</q-item-section>
@ -148,7 +152,7 @@ const onLoad = (async (_: any, done: any) => {
store.currentTitle = item.title;
store.correntStatusIssue = item.status;
store.currentCategory = item.category.name;
createdByUser = item.createdByUserId;
store.createdByUser = item.createdByUserId;
store.issue
? (store.issue.result = store.issue.result.map((v) => {
if (v.id === item.id) {
@ -171,7 +175,12 @@ const onLoad = (async (_: any, done: any) => {
</q-avatar>
</div>
<div class="col column q-ml-md">
<span class="text-long col text-weight-bold line-ellipsis">
<span>
<q-badge color="blue">
{{ item.category.name }}
</q-badge>
</span>
<span class="text-longcol text-weight-bold line-ellipsis">
{{ item.title }}
</span>