Skip to content

Commit 70ef05c

Browse files
committed
Update actions.vue
1 parent cea987d commit 70ef05c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/components/identityForm/actions.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
7478
const $q = useQuasar()
7579
const router = useRouter()
7680
const { getStateColor, getStateName } = useIdentityStates()
@@ -109,8 +113,10 @@ async function create() {
109113
emits('create')
110114
}
111115
function 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
}

0 commit comments

Comments
 (0)