finanzer: leute mit schulden werden als erstes angezeigt
This commit is contained in:
		
							parent
							
								
									e7eb37c7bc
								
							
						
					
					
						commit
						a074ea0dd3
					
				| 
						 | 
				
			
			@ -70,7 +70,9 @@
 | 
			
		|||
        style="margin-top: 3px"
 | 
			
		||||
        :loading="user.loading"
 | 
			
		||||
      >
 | 
			
		||||
        <v-card-title>{{ user.lastname }}, {{ user.firstname }}</v-card-title>
 | 
			
		||||
        <v-card-title>
 | 
			
		||||
          {{ user.lastname }}, {{ user.firstname }}
 | 
			
		||||
        </v-card-title>
 | 
			
		||||
        <Table v-bind:user="user" v-bind:year="year" />
 | 
			
		||||
        <v-container fluid>
 | 
			
		||||
          <v-row align="start" align-content="start">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -180,7 +180,17 @@ const mutations = {
 | 
			
		|||
    return sum
 | 
			
		||||
  },
 | 
			
		||||
  sortUsers: state => {
 | 
			
		||||
    console.log(state.users)
 | 
			
		||||
    state.users = state.users.sort((a, b) => {
 | 
			
		||||
      if (a.locked && b.locked) {
 | 
			
		||||
        if (a.lastname > b.lastname) return 1
 | 
			
		||||
        if (a.lastname < b.lastname) return -1
 | 
			
		||||
        if (a.firstname > b.firstname) return 1
 | 
			
		||||
        if (a.firstname < b.firstname) return -1
 | 
			
		||||
        return 0
 | 
			
		||||
      }
 | 
			
		||||
      if (a.locked) return -1
 | 
			
		||||
      if (b.locked) return 1
 | 
			
		||||
      if (a.lastname > b.lastname) return 1
 | 
			
		||||
      if (a.lastname < b.lastname) return -1
 | 
			
		||||
      if (a.firstname > b.firstname) return 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue