Correction bug bdd docker
continuous-integration/drone/push Build is passing Details

peristanceBDD
Thomas Chazot 2 years ago
parent e18aec54b2
commit e95a26746c

@ -29,7 +29,8 @@ $conn->query("CREATE TABLE `T_H_CONVERSATION_COV` (
$conn->query("CREATE TRIGGER `before_delete_conversation` BEFORE DELETE ON `T_H_CONVERSATION_COV` FOR EACH ROW DELETE FROM T_H_MESSAGE_MSG WHERE PK_ID = (SELECT FK_MESSAGE
FROM T_J_CONTAIN_MESSAGE_CMG
WHERE FK_CONVERSATION=OLD.PK_ID);");
WHERE FK_CONVERSATION=OLD.PK_ID);
END;");
$conn->query("CREATE TABLE `T_H_MESSAGE_MSG` (
`PK_ID` int(11) NOT NULL,
@ -84,7 +85,7 @@ $conn->query("CREATE TABLE `T_S_USER_USR` (
);");
$conn->query("CREATE TRIGGER `after_insert_user` AFTER INSERT ON `T_S_USER_USR` FOR EACH ROW INSERT INTO T_J_OWN_SKIN_OWN VALUES(NEW.PK_ID,1);");
$conn->query("CREATE TRIGGER `after_insert_user` AFTER INSERT ON `T_S_USER_USR` FOR EACH ROW INSERT INTO T_J_OWN_SKIN_OWN VALUES(NEW.PK_ID,1); END;");
$conn->query("ALTER TABLE `T_E_GAME_GAM`

@ -66,7 +66,7 @@ FC<{nav: any}> =
getUsers();
return(
<View style={stylesScreen.bodyStartCenter}>
<Text style={style.text}>Match ID : {MANAGER_MATCH.getCurrentMatch()?.getCode()}</Text>
<Text style={style.text}>Match ID : {useMatchStore().match?.getCode()}</Text>
<FlatList
data={useMatchStore().tabUser}
keyExtractor={usr =>usr?.getUsername() || usr}

@ -19,7 +19,6 @@ export const UserPreview :
FC<{user: User | null}> =
({user}) =>
{
console.log(user);
if(user !== null){
return (
<View style= {styles.view}>

@ -1,5 +1,5 @@
import { StatusBar } from 'expo-status-bar'
import {View, FlatList, Text} from 'react-native'
import {View, FlatList, Text, Alert} from 'react-native'
import React, { useState } from 'react';
import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
@ -8,13 +8,25 @@ import { ScreenIndicator } from '../components/ScreenIndicator';
import { TextInput } from 'react-native-gesture-handler';
import stylesScreen from './style/screens.style'
import styles from './style/GameChoice.style'
import { MANAGER_GAME } from '../../appManagers';
import { MANAGER_GAME, MANAGER_MATCH, MANAGER_USER } from '../../appManagers';
import { GameList } from '../components/GameList';
function GameChoice(props: { navigation: any}) {
const { navigation} = props
const [matchId, setMatchId] = useState('');
async function joinMatch(id:string){
const newId = parseInt(id);
const tmp=MANAGER_USER.getCurrentUser();
if (tmp !== null){
await MANAGER_MATCH.getsaverMatch().joinMatch(tmp, newId).then((res) =>{
if (res===null){
Alert.alert()
}
});
}
}
if(MANAGER_GAME.currentGameType === "solo" ){
return (
@ -48,7 +60,7 @@ function GameChoice(props: { navigation: any}) {
/>
<View style={{backgroundColor: '#2D2C33', flexDirection: 'row', alignContent: 'flex-start', margin: '2%', borderRadius: 15}}>
<Text style={styles.text}>Rejoindre un match</Text>
<TextInput style={styles.textInput} placeholder='Id' onChangeText={(val) => setMatchId(val)} autoCapitalize='none' />
<TextInput style={styles.textInput} placeholder='Id' onChangeText={(val) => setMatchId(val)} onSubmitEditing={(val) => {joinMatch(val)}} autoCapitalize='none' />
</View>
</View>
<BotBar

@ -26,7 +26,7 @@ export class LoaderConversationApi implements ILoaderConversation{
url: url,
})
.then(async function (response: any) {
if (response.data != null || response.data != undefined){
if (response.data != null && response.data != undefined){
tabConv=await jsonToConversation(response);
}
});

@ -12,16 +12,16 @@ export default class LoaderGameApi implements ILoaderGame{
async loadAllGames(): Promise<Game[]> {
let tab: Game[]=[];
const url=this.baseUrl+"http://localhost:8888/api-rest/index.php/getGames";
const url=this.baseUrl+"getGames";
await this.axios({
method: 'get',
url: url,
})
.then(function (response: any) {
if (response.data != null || response.data != undefined){
if (response.data != null && response.data != undefined){
response.data.forEach(game => {
switch(game.type){
case "GameSolo":
let mapSolo = new Map();

Loading…
Cancel
Save