fix bug addRessource
This commit is contained in:
@@ -1,24 +1,17 @@
|
||||
import ChantierSummary from '@/components/chantierSummary';
|
||||
import SelectChantier from '@/components/selectChantier';
|
||||
import SetStatus from '@/components/setStatus';
|
||||
|
||||
|
||||
import { ThemedView } from '@/components/theme/themed-view';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { StyleSheet, ScrollView, Button, TextInput, Text, View, Modal } from 'react-native';
|
||||
import { useChantier } from '@/app/ContextChantier';
|
||||
import { useRessources } from '@/app/ContextRessource';
|
||||
import { useUser } from '@/app/ContextUser';
|
||||
import { getRessources, getUsers, addChantier , addRessources} from '@/services/ressourcesService';
|
||||
import { Chantier, Ressources, User } from '@/class/class';
|
||||
import { ThemedText } from '@/components/theme/themed-text';
|
||||
import { Ressources } from '@/class/class';
|
||||
import { ThemedButton } from '@/components/theme/themed-button';
|
||||
import { ThemedText } from '@/components/theme/themed-text';
|
||||
import { ThemedTextInput } from '@/components/theme/themed-textinput';
|
||||
import DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
||||
import { ThemedView } from '@/components/theme/themed-view';
|
||||
import { addRessources } from '@/services/ressourcesService';
|
||||
import React, { useState } from 'react';
|
||||
import { Modal, ScrollView, StyleSheet, View } from 'react-native';
|
||||
|
||||
import Constants from 'expo-constants'; //pour connaître la taille de la barre menu de l'OS en haut
|
||||
import SelectChafChantier from '@/components/add/select/selectChefChantier';
|
||||
import SelectMachine from '@/components/selectMachine';
|
||||
|
||||
|
||||
type Dictionary = {
|
||||
@@ -66,9 +59,9 @@ export default function AddRessource({ressourceType, ...otherProps }: Props) {
|
||||
name: nom,
|
||||
type : ressourceType,
|
||||
quantity : parseInt(quantite),
|
||||
available_quantity : parseInt(quantite),
|
||||
//available_quantity : parseInt(quantite),
|
||||
Image : "",
|
||||
allocation : [],
|
||||
//allocation : [],
|
||||
};
|
||||
const id = await addRessources(nouvelleRessource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user