1404/12/24-add alert text close deals

This commit is contained in:
2026-03-15 15:02:46 +03:30
parent 73ec52941d
commit 36db45df33
3 changed files with 12 additions and 0 deletions
+1
View File
@@ -16,4 +16,5 @@ export interface Price {
sell: number
buy: number
price_last: number
goldir:number
}
+7
View File
@@ -25,6 +25,12 @@ export const useUserStore = defineStore('user', () => {
console.log(e)
}
}
function getValueByKey(keyName) {
const item = userInfo.value.settings.find(obj => obj.key === keyName);
// اگر آیتم پیدا شد، فیلد value را برگردان، در غیر این صورت null
return item ? item.value : null;
}
function removeInformation() {
userInfo.value = undefined
@@ -55,6 +61,7 @@ export const useUserStore = defineStore('user', () => {
removeInformation,
isSingle,
isFirst,
getValueByKey,
productWallet/* permissions, canAccess, isAdmin*/
}
})
+4
View File
@@ -186,6 +186,10 @@
</div>
</div>-->
</div>
<div v-if="userStore.getValueByKey('closed_message') && lastPrice.goldir==0 "
class="bg-red-50 text-red-600 text-center font-500 py-4 px-2 mt-2 rounded-lg "
v-html="userStore.getValueByKey('closed_message')"
></div>
<div
class="w-full relative mt-2 border-gray-200 border-1 rounded-lg py-3 flex flex-col justify-center home_appear_fade_in"
>