File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/components/identityForm Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ div.flex
33 div
44 q-btn( color ="positive" icon ='mdi-content-save-plus' @click ="create" v-show ="isNew" v-if ="crud.create" )
55 q-tooltip.text-body2 Créer
6- q-toggle.q-pa-md.q-gutter-y-lg ( unchecked-icon = "mdi-account-cancel"
6+ q-toggle.q-pa-md.q-gutter-y-lg (
77 checked-icon ="mdi-account-check"
8+ unchecked-icon ="mdi-account-cancel"
9+ indeterminate-icon ="mdi-lock-reset"
10+ keep-color
811 size ="xl"
912 @click ="activate"
1013 :color ="setActivateColor()"
@@ -71,6 +74,7 @@ const props = defineProps({
7174 required: true ,
7275 },
7376})
77+
7478const $q = useQuasar ()
7579const router = useRouter ()
7680const { getStateColor, getStateName } = useIdentityStates ()
@@ -109,8 +113,10 @@ async function create() {
109113 emits (' create' )
110114}
111115function setActivateColor(){
112- if (props .identity .lastBackendSync != " " ){
116+ if (props .identity .dataStatus === 1 ){
113117 return " green"
118+ }else if (props .identity .dataStatus === - 3 ){
119+ return " negative"
114120 }else {
115121 return " grey"
116122 }
You can’t perform that action at this time.
0 commit comments