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