Hatgetippt hinzugefügt (muss noch debuggt werden)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="js">
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
users: {
|
users: {
|
||||||
@@ -16,8 +16,7 @@ export default {
|
|||||||
<td v-for="user in users">{{ user.kuerzel }}</td>
|
<td v-for="user in users">{{ user.kuerzel }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td v-for="user in users">{{ user.points }}</td>
|
<td v-for="user in users" :style="{color: user.hatgetippt?'green':'red'}">{{ user.points }}</td>
|
||||||
<!-- <iframe class="iframeRanglisteDetailansicht">Benutzer</iframe> -->
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,13 +1,25 @@
|
|||||||
|
import $ from "jquery";
|
||||||
class User {
|
class User {
|
||||||
public username: string;
|
public username: string;
|
||||||
public kuerzel: string;
|
public kuerzel: string;
|
||||||
public points: number;
|
public points: number;
|
||||||
public id: number;
|
public id: number;
|
||||||
|
public hatgetippt: boolean;
|
||||||
constructor (username: string, kuerzel: string, points: number, id: number) {
|
constructor (username: string, kuerzel: string, points: number, id: number) {
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.kuerzel = kuerzel;
|
this.kuerzel = kuerzel;
|
||||||
this.points=points;
|
this.points=points;
|
||||||
this.id=id;
|
this.id=id;
|
||||||
|
let hatgetippt=false;
|
||||||
|
$.ajax(RitzenbergenLib.api("/bulitipp/hatgetippt.php?userid="+id),{
|
||||||
|
async: false,
|
||||||
|
success(response:string){
|
||||||
|
hatgetippt=response=="true";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.hatgetippt=hatgetippt;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import Tabelle from "../components/bulitipp/Tabelle.vue";
|
|||||||
import RitzenbergenLib from "../ritzenbergenlib.ts";
|
import RitzenbergenLib from "../ritzenbergenlib.ts";
|
||||||
import SpieltagSumme from "../ritzenbergenlib.ts";
|
import SpieltagSumme from "../ritzenbergenlib.ts";
|
||||||
import Loading from "../components/bulitipp/Loading.vue";
|
import Loading from "../components/bulitipp/Loading.vue";
|
||||||
|
import $ from "jquery";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -66,6 +67,7 @@ export default {
|
|||||||
result.map(element => element.map((element) => {
|
result.map(element => element.map((element) => {
|
||||||
|
|
||||||
element.user=new RitzenbergenLib.User(element.user.name, element.user.kuerzel,0, element.user.id);
|
element.user=new RitzenbergenLib.User(element.user.name, element.user.kuerzel,0, element.user.id);
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}));
|
}));
|
||||||
return result;
|
return result;
|
||||||
@@ -146,7 +148,8 @@ export default {
|
|||||||
},
|
},
|
||||||
update(){
|
update(){
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user