cad-4 douala 4
|
@ -130,10 +130,10 @@ android {
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
// TODO: Switch from test to prod and vice versa
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// applicationId "com.test_city.douala3"
|
applicationId "com.test_city.douala4"
|
||||||
applicationId "com.test_city.douala3test"
|
// applicationId "com.test_city.douala4test"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
missingDimensionStrategy 'react-native-camera', 'general'
|
missingDimensionStrategy 'react-native-camera', 'general'
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class MainActivity extends ReactActivity {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
return "ilinkcity_douala3";
|
return "ilinkcity_douala4";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 26 KiB |
|
@ -1,4 +1,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Test SIM_ba mobile CAD3</string>
|
<!-- TODO: Switch from test to prod and vice versa -->
|
||||||
<!-- <string name="app_name">SIM_ba mobile CAD3</string> -->
|
<!-- <string name="app_name">Test SIM_ba mobile CAD4</string> -->
|
||||||
|
<string name="app_name">SIM_ba mobile CAD4</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
4
app.json
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "ilinkcity_douala3",
|
"name": "ilinkcity_douala4",
|
||||||
"displayName": "ilinkcity_douala3"
|
"displayName": "ilinkcity_douala4"
|
||||||
}
|
}
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 88 KiB |
|
@ -19,6 +19,7 @@ import {ProgressDialog} from "react-native-simple-dialogs";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {uploadImage} from "../../webservice/IlinkConstants";
|
import {uploadImage} from "../../webservice/IlinkConstants";
|
||||||
import Dialog from "react-native-dialog";
|
import Dialog from "react-native-dialog";
|
||||||
|
import FilteredList from "../login/FilteredList ";
|
||||||
|
|
||||||
let theme = require('./../../utils/theme.json');
|
let theme = require('./../../utils/theme.json');
|
||||||
|
|
||||||
|
@ -115,7 +116,10 @@ export default class AddNetwork extends Component {
|
||||||
displayImage: false,
|
displayImage: false,
|
||||||
loadingUpload: false,
|
loadingUpload: false,
|
||||||
item: this.props.navigation.getParam("item", null),
|
item: this.props.navigation.getParam("item", null),
|
||||||
password: null
|
password: null,
|
||||||
|
neighborhood: null,
|
||||||
|
building_value: [],
|
||||||
|
built: [false]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,6 +223,14 @@ export default class AddNetwork extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTaxesDropdown = (index) => {
|
renderTaxesDropdown = (index) => {
|
||||||
|
const selectedNeighbourhood = this.state.result && this.state.result.neighborhoods
|
||||||
|
? this.state.result.neighborhoods.find(n => n.name === this.state.neighborhood)
|
||||||
|
: null;
|
||||||
|
const mercurialValue = selectedNeighbourhood
|
||||||
|
? (this.state.built[index]
|
||||||
|
? selectedNeighbourhood.mercur_built_value
|
||||||
|
: selectedNeighbourhood.mercur_unbuilt_value)
|
||||||
|
: null;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Animatable.View key={index}>
|
<Animatable.View key={index}>
|
||||||
|
@ -348,6 +360,65 @@ export default class AddNetwork extends Component {
|
||||||
</> :
|
</> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
!isNil(this.state.taxes_selected[index]) &&
|
||||||
|
this.state.taxes_selected[index].name?.toLowerCase() === 'taxe sur la propriété' && (
|
||||||
|
<>
|
||||||
|
<Animatable.View>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
width: responsiveWidth(90),
|
||||||
|
alignSelf: 'center',
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: 10,
|
||||||
|
marginTop: 20,
|
||||||
|
paddingLeft: 20,
|
||||||
|
paddingRight: 20,
|
||||||
|
}}>
|
||||||
|
<Dropdown
|
||||||
|
label={I18n.t('BUILDING_CONSTRUCTED')}
|
||||||
|
data={[{value: 'Non'}, {value: 'Oui'}]}
|
||||||
|
value={this.state.built[index] ? 'Oui' : 'Non'}
|
||||||
|
onChangeText={value => {
|
||||||
|
const built = [...this.state.built];
|
||||||
|
built[index] = value === 'Oui';
|
||||||
|
this.setState({built});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</Animatable.View>
|
||||||
|
{mercurialValue != null && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
marginTop: 5,
|
||||||
|
marginLeft: responsiveWidth(6),
|
||||||
|
fontSize: 16,
|
||||||
|
color: '#fff',
|
||||||
|
}}>
|
||||||
|
{`${I18n.t('MERCURIAL_VALUE')}: ${mercurialValue}`}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{this.state.built[index] && (
|
||||||
|
<Animatable.View>
|
||||||
|
<Fumi
|
||||||
|
iconClass={FontAwesomeIcon}
|
||||||
|
iconName="building"
|
||||||
|
label={I18n.t('CONSTRUCTION_VALUE')}
|
||||||
|
iconColor="#f95a25"
|
||||||
|
iconSize={20}
|
||||||
|
keyboardType="decimal-pad"
|
||||||
|
style={styles.input}
|
||||||
|
onChangeText={value => {
|
||||||
|
const building_value = [...this.state.building_value];
|
||||||
|
building_value[index] = value;
|
||||||
|
this.setState({building_value});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Animatable.View>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
{
|
{
|
||||||
!isNil(this.state.taxes_selected[index]) ?
|
!isNil(this.state.taxes_selected[index]) ?
|
||||||
this.state.taxes_selected[index].billing_period === 'jour' &&
|
this.state.taxes_selected[index].billing_period === 'jour' &&
|
||||||
|
@ -408,6 +479,9 @@ export default class AddNetwork extends Component {
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const hasPropertyTax = this.state.taxes_selected.some(
|
||||||
|
t => t && t.name?.toLowerCase() === 'taxe sur la propriété'
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<View style={style.container}>
|
<View style={style.container}>
|
||||||
<StatusBar
|
<StatusBar
|
||||||
|
@ -443,6 +517,17 @@ export default class AddNetwork extends Component {
|
||||||
</> :
|
</> :
|
||||||
<>
|
<>
|
||||||
{this.renderTaxesDropdown(0)}
|
{this.renderTaxesDropdown(0)}
|
||||||
|
{hasPropertyTax && (
|
||||||
|
<Animatable.View>
|
||||||
|
<FilteredList
|
||||||
|
items={this.state.result.neighborhoods}
|
||||||
|
placeholder={I18n.t('FIND_A_NEIGHBORHOOD')}
|
||||||
|
onItemSelect={selectedItem => {
|
||||||
|
this.setState({neighborhood: selectedItem.name});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Animatable.View>
|
||||||
|
)}
|
||||||
{
|
{
|
||||||
this.state.tabTaxe.map((element, index) => (
|
this.state.tabTaxe.map((element, index) => (
|
||||||
index > 0 &&
|
index > 0 &&
|
||||||
|
@ -517,26 +602,38 @@ export default class AddNetwork extends Component {
|
||||||
for (let i = 0; i < this.state.tabTaxe.length; i++) {
|
for (let i = 0; i < this.state.tabTaxe.length; i++) {
|
||||||
if (this.state.taxes_selected[i].hasOwnProperty("id")) {
|
if (this.state.taxes_selected[i].hasOwnProperty("id")) {
|
||||||
if (this.state.taxes_selected[i].has_image_capture === "1") {
|
if (this.state.taxes_selected[i].has_image_capture === "1") {
|
||||||
taxes_to_send.push({
|
let taxe = {
|
||||||
has_image_capture: this.state.taxes_selected[i].has_image_capture,
|
has_image_capture: this.state.taxes_selected[i].has_image_capture,
|
||||||
image: this.state.taxes_selected[i].image,
|
image: this.state.taxes_selected[i].image,
|
||||||
id_network_tax: this.state.taxes_selected[i].id,
|
id_network_tax: this.state.taxes_selected[i].id,
|
||||||
|
name: this.state.taxes_selected[i].name,
|
||||||
tax_units_count: isNil(this.state.tax_units_count[i]) ? null : this.state.tax_units_count[i],
|
tax_units_count: isNil(this.state.tax_units_count[i]) ? null : this.state.tax_units_count[i],
|
||||||
units_per_tax_unit_count: isNil(this.state.units_per_tax_unit_count[i]) ? null : this.state.units_per_tax_unit_count[i],
|
units_per_tax_unit_count: isNil(this.state.units_per_tax_unit_count[i]) ? null : this.state.units_per_tax_unit_count[i],
|
||||||
number_of_days: isNil(this.state.number_of_days[i]) ? null : this.state.number_of_days[i],
|
number_of_days: isNil(this.state.number_of_days[i]) ? null : this.state.number_of_days[i],
|
||||||
});
|
};
|
||||||
|
if (this.state.taxes_selected[i].name?.toLowerCase() === 'taxe sur la propriété') {
|
||||||
|
taxe.building_value = isNil(this.state.building_value[i]) ? null : this.state.building_value[i];
|
||||||
|
taxe.built = this.state.built[i];
|
||||||
|
}
|
||||||
|
taxes_to_send.push(taxe);
|
||||||
} else {
|
} else {
|
||||||
taxes_to_send.push({
|
let taxe = {
|
||||||
has_image_capture: this.state.taxes_selected[i].has_image_capture,
|
has_image_capture: this.state.taxes_selected[i].has_image_capture,
|
||||||
id_network_tax: this.state.taxes_selected[i].id,
|
id_network_tax: this.state.taxes_selected[i].id,
|
||||||
|
name: this.state.taxes_selected[i].name,
|
||||||
tax_units_count: isNil(this.state.tax_units_count[i]) ? null : this.state.tax_units_count[i],
|
tax_units_count: isNil(this.state.tax_units_count[i]) ? null : this.state.tax_units_count[i],
|
||||||
units_per_tax_unit_count: isNil(this.state.units_per_tax_unit_count[i]) ? null : this.state.units_per_tax_unit_count[i],
|
units_per_tax_unit_count: isNil(this.state.units_per_tax_unit_count[i]) ? null : this.state.units_per_tax_unit_count[i],
|
||||||
number_of_days: isNil(this.state.number_of_days[i]) ? null : this.state.number_of_days[i],
|
number_of_days: isNil(this.state.number_of_days[i]) ? null : this.state.number_of_days[i],
|
||||||
});
|
};
|
||||||
|
if (this.state.taxes_selected[i].name?.toLowerCase() === 'taxe sur la propriété') {
|
||||||
|
taxe.building_value = isNil(this.state.building_value[i]) ? null : this.state.building_value[i];
|
||||||
|
taxe.built = this.state.built[i];
|
||||||
|
}
|
||||||
|
taxes_to_send.push(taxe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let res = await AssignAgentGeo(validateCode, enterPhone, taxes_to_send, item.id_agent, password, item.id);
|
let res = await AssignAgentGeo(validateCode, enterPhone, taxes_to_send, item.id_agent, password, item.id, this.state.neighborhood);
|
||||||
this.setState({isLoading: false});
|
this.setState({isLoading: false});
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res['success'] !== undefined) {
|
if (res['success'] !== undefined) {
|
||||||
|
@ -600,8 +697,8 @@ const style = StyleSheet.create({
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
backgroundColor: theme.primaryDarkAdvanced,
|
backgroundColor: theme.primaryDarkAdvanced,
|
||||||
height: responsiveHeight(8)
|
height: responsiveHeight(8),
|
||||||
|
marginBottom: responsiveHeight(8) // espace ajouté en bas
|
||||||
},
|
},
|
||||||
appContainer: {
|
appContainer: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
|
|
@ -4,6 +4,7 @@ import Button from 'apsl-react-native-button';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import isNil from 'lodash/isNil';
|
import isNil from 'lodash/isNil';
|
||||||
|
import React from 'react';
|
||||||
import {Component} from 'react';
|
import {Component} from 'react';
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
|
@ -152,7 +153,7 @@ class CreateUserStep extends Component {
|
||||||
technical_approval: null,
|
technical_approval: null,
|
||||||
municipality: 'Douala',
|
municipality: 'Douala',
|
||||||
neighborhood: null,
|
neighborhood: null,
|
||||||
district: 'Douala 3eme',
|
district: 'Douala 4',
|
||||||
id_patente: null,
|
id_patente: null,
|
||||||
TVA: false,
|
TVA: false,
|
||||||
IRPP: false,
|
IRPP: false,
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {responsiveHeight, responsiveWidth, responsiveFontSize} from 'react-nativ
|
||||||
import {Fumi, Kaede} from 'react-native-textinput-effects'
|
import {Fumi, Kaede} from 'react-native-textinput-effects'
|
||||||
import * as Animatable from 'react-native-animatable'
|
import * as Animatable from 'react-native-animatable'
|
||||||
import Button from 'apsl-react-native-button'
|
import Button from 'apsl-react-native-button'
|
||||||
import {categoryChild, getCodeInformation, getSupervisorInfoCode} from './../../webservice/AuthApi'
|
import {categoryChild, getCodeInformation, getSupervisorInfoCode, getSupervisorInfoCodeOffline} from './../../webservice/AuthApi'
|
||||||
|
|
||||||
let theme = require('./../../utils/theme.json')
|
let theme = require('./../../utils/theme.json')
|
||||||
let route = require('./../../route.json')
|
let route = require('./../../route.json')
|
||||||
|
@ -515,8 +515,19 @@ export default class CreateAccount extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// retreiveSupervisorInfosCode() {
|
||||||
|
// getSupervisorInfoCode().then((result) => {
|
||||||
|
// console.warn("SUPERVISOR INFOS CODE", JSON.stringify(result));
|
||||||
|
// storeData(supervisorCode, JSON.stringify(result)).then(() => {
|
||||||
|
// this.setState({displayLoader: false});
|
||||||
|
// });
|
||||||
|
// }).catch(error => {
|
||||||
|
// //console.log(error);
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
retreiveSupervisorInfosCode() {
|
retreiveSupervisorInfosCode() {
|
||||||
getSupervisorInfoCode().then((result) => {
|
getSupervisorInfoCodeOffline().then((result) => {
|
||||||
console.warn("SUPERVISOR INFOS CODE", JSON.stringify(result));
|
console.warn("SUPERVISOR INFOS CODE", JSON.stringify(result));
|
||||||
storeData(supervisorCode, JSON.stringify(result)).then(() => {
|
storeData(supervisorCode, JSON.stringify(result)).then(() => {
|
||||||
this.setState({displayLoader: false});
|
this.setState({displayLoader: false});
|
||||||
|
@ -614,7 +625,8 @@ export default class CreateAccount extends Component {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
let codeSupervisorsData = JSON.parse(codeSupervisor);
|
let codeSupervisorsData = JSON.parse(codeSupervisor);
|
||||||
let codeSupervisors = Object.keys(codeSupervisorsData);
|
let codeSupervisorsDataCodes = codeSupervisorsData.codes;
|
||||||
|
let codeSupervisors = Object.keys(codeSupervisorsData.codes);
|
||||||
this.setState({codeSupervisorsData});
|
this.setState({codeSupervisorsData});
|
||||||
|
|
||||||
if (!codeSupervisors.includes(user.member)) {
|
if (!codeSupervisors.includes(user.member)) {
|
||||||
|
@ -627,8 +639,17 @@ export default class CreateAccount extends Component {
|
||||||
}], {cancelable: false});
|
}], {cancelable: false});
|
||||||
} else {
|
} else {
|
||||||
this.setState({isLoging: false});
|
this.setState({isLoging: false});
|
||||||
let resultInfosCode = codeSupervisorsData[user.member];
|
let resultInfosCode = codeSupervisorsDataCodes[user.member];
|
||||||
this.setState({codeSupervisorData: resultInfosCode});
|
const completedResultInfosCode = {
|
||||||
|
...resultInfosCode,
|
||||||
|
companies_types:codeSupervisorsData.globals.companies_types ,
|
||||||
|
districts: codeSupervisorsData.globals.districts,
|
||||||
|
neighborhoods: codeSupervisorsData.globals.neighborhoods,
|
||||||
|
activities: codeSupervisorsData.globals.activities,
|
||||||
|
municipalities: codeSupervisorsData.globals.municipalities
|
||||||
|
};
|
||||||
|
this.setState({codeSupervisorData: completedResultInfosCode});
|
||||||
|
|
||||||
|
|
||||||
if (resultInfosCode.network.is_companies_network === "1" && resultInfosCode.child == "geolocated") {
|
if (resultInfosCode.network.is_companies_network === "1" && resultInfosCode.child == "geolocated") {
|
||||||
this.props.navigation.push(route.createUserStep, {
|
this.props.navigation.push(route.createUserStep, {
|
||||||
|
|
|
@ -14,7 +14,8 @@ import {
|
||||||
getPasObject,
|
getPasObject,
|
||||||
getPubActiveObject,
|
getPubActiveObject,
|
||||||
getSupervisorInfoCode,
|
getSupervisorInfoCode,
|
||||||
getAppVersion
|
getAppVersion,
|
||||||
|
getSupervisorInfoCodeOffline
|
||||||
} from '../../webservice/AuthApi';
|
} from '../../webservice/AuthApi';
|
||||||
import {Bubbles, DoubleBounce, Bars, Pulse} from 'react-native-loader';
|
import {Bubbles, DoubleBounce, Bars, Pulse} from 'react-native-loader';
|
||||||
import Configuration from "../../webservice/persistences/Configuration";
|
import Configuration from "../../webservice/persistences/Configuration";
|
||||||
|
@ -58,7 +59,7 @@ export default class SplashScreen extends Component {
|
||||||
//
|
//
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.retreiveSupervisorInfosCode();
|
// this.retreiveSupervisorInfosCode();
|
||||||
this.state = {}
|
this.state = {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,10 +131,29 @@ export default class SplashScreen extends Component {
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
initializeOfflineMode = () => {
|
||||||
|
console.log("Initialisation du mode Hors Ligne...");
|
||||||
|
getSupervisorInfoCodeOffline()
|
||||||
|
.then((result) => {
|
||||||
|
console.warn("SUPERVISOR INFOS CODE_", JSON.stringify(result));
|
||||||
|
storeData(supervisorCode, JSON.stringify(result))
|
||||||
|
.then(() => {
|
||||||
|
this.setState({ offlineInitialized: true, isLoading: false });
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error("Erreur lors du stockage :", error);
|
||||||
|
this.setState({ isLoading: false });
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error("Erreur lors de la récupération des infos :", error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
console.log("ComponentDidMount===>>")
|
console.log("ComponentDidMount===>>")
|
||||||
this.retreiveSupervisorInfosCode();
|
this.initializeOfflineMode();
|
||||||
|
// this.retreiveSupervisorInfosCode();
|
||||||
try {
|
try {
|
||||||
this.requestCameraPermission()
|
this.requestCameraPermission()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -394,7 +394,7 @@ class AvisImpositionDetail extends Component {
|
||||||
marginLeft: 20
|
marginLeft: 20
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.simpleuser}>{`${item.lastname} | ${item.email}`}</Text>
|
<Text style={[styles.simpleuser,styles.multiLine]}>{`${item.lastname} | ${item.email}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
@ -407,7 +407,7 @@ class AvisImpositionDetail extends Component {
|
||||||
marginLeft: 20
|
marginLeft: 20
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.simpleuser}>{`${item.email} | ${item.phone}`}</Text>
|
<Text style={[styles.simpleuser,styles.multiLine]}>{`${item.email} | ${item.phone}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
@ -420,7 +420,7 @@ class AvisImpositionDetail extends Component {
|
||||||
marginLeft: 20
|
marginLeft: 20
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.simpleuser}>{`${item.adresse}`}</Text>
|
<Text style={[styles.simpleuser,styles.multiLine]}>{`${item.adresse}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* <View style={{
|
{/* <View style={{
|
||||||
|
@ -463,7 +463,7 @@ class AvisImpositionDetail extends Component {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text
|
<Text
|
||||||
style={styles.simpleuser}>{`${this.state.item.amount}`}</Text>
|
style={[styles.simpleuser,styles.multiLine]}>{`${this.state.item.amount}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={{
|
<View style={{
|
||||||
|
@ -478,7 +478,7 @@ class AvisImpositionDetail extends Component {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text
|
<Text
|
||||||
style={styles.simpleuser}>{`${I18n.t('CREATION_DATE')}: ${created_at.format(" Do MMMM YYYY à HH:mm")}`}</Text>
|
style={[styles.simpleuser,styles.multiLine]}>{`${I18n.t('CREATION_DATE')}: ${created_at.format(" Do MMMM YYYY à HH:mm")}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={{
|
<View style={{
|
||||||
|
@ -493,7 +493,7 @@ class AvisImpositionDetail extends Component {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text
|
<Text
|
||||||
style={styles.simpleuser}>{`${I18n.t('UPDATE_DATE')}: ${updated_at.format(" Do MMMM YYYY à HH:mm")}`}</Text>
|
style={[styles.simpleuser,styles.multiLine]}>{`${I18n.t('UPDATE_DATE')}: ${updated_at.format(" Do MMMM YYYY à HH:mm")}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={{
|
<View style={{
|
||||||
|
@ -527,37 +527,10 @@ class AvisImpositionDetail extends Component {
|
||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
|
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'column',
|
||||||
paddingTop: 10
|
paddingTop: 10,
|
||||||
|
paddingHorizontal:12
|
||||||
}}>
|
}}>
|
||||||
|
|
||||||
{
|
|
||||||
this.state.item.is_company === 0 &&
|
|
||||||
<View style={{
|
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center'
|
|
||||||
}}>
|
|
||||||
<Button
|
|
||||||
style={{
|
|
||||||
borderColor: 'transparent',
|
|
||||||
borderRadius: 6,
|
|
||||||
marginLeft: 5,
|
|
||||||
marginRight: 5,
|
|
||||||
backgroundColor: Color.primaryColor
|
|
||||||
}}
|
|
||||||
isLoading={false}
|
|
||||||
onPress={() => {
|
|
||||||
this.props.navigation.push(route.addNetwork, {
|
|
||||||
item: this.state.item
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
textStyle={styles.textbtnstyle}
|
|
||||||
>
|
|
||||||
{I18n.t('ADD_NETWORK')}
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
|
|
||||||
<View style={{
|
<View style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
|
@ -580,6 +553,35 @@ class AvisImpositionDetail extends Component {
|
||||||
{I18n.t('SAVE')}
|
{I18n.t('SAVE')}
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
{
|
||||||
|
this.state.item.is_company === 0 &&
|
||||||
|
<View style={{
|
||||||
|
flex: 1,
|
||||||
|
alignItems: 'center'
|
||||||
|
}}>
|
||||||
|
<Button
|
||||||
|
style={{
|
||||||
|
borderColor: 'transparent',
|
||||||
|
borderRadius: 6,
|
||||||
|
marginLeft: 5,
|
||||||
|
marginRight: 5,
|
||||||
|
backgroundColor: Color.primaryColor
|
||||||
|
}}
|
||||||
|
isLoading={false}
|
||||||
|
onPress={() => {
|
||||||
|
this.props.navigation.push(route.addNetwork, {
|
||||||
|
item: this.state.item
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
textStyle={[styles.textbtnstyle, styles.textbtnPadding]}
|
||||||
|
>
|
||||||
|
{I18n.t('ADD_NETWORK')}
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
@ -667,11 +669,19 @@ const styles = StyleSheet.create({
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: '#3E3E3E'
|
color: '#3E3E3E'
|
||||||
},
|
},
|
||||||
|
multiLine: {
|
||||||
|
flexShrink: 1,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
},
|
||||||
textbtnstyle: {
|
textbtnstyle: {
|
||||||
color: "white",
|
color: "white",
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
},
|
},
|
||||||
|
textbtnPadding: {
|
||||||
|
paddingHorizontal: 4,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
input: {
|
input: {
|
||||||
height: 60,
|
height: 60,
|
||||||
marginTop: responsiveHeight(2),
|
marginTop: responsiveHeight(2),
|
||||||
|
|
|
@ -41,6 +41,7 @@ export const getCodeInformationForAddTaxe = (code, id_agent) => {
|
||||||
var data = {
|
var data = {
|
||||||
"tag": 'member', "type": "agen_info_code", "code": code,
|
"tag": 'member', "type": "agen_info_code", "code": code,
|
||||||
"lang": I18n.currentLocale(),
|
"lang": I18n.currentLocale(),
|
||||||
|
"isRegistration": false,
|
||||||
id_agent
|
id_agent
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -397,6 +398,9 @@ export const getTownInformationName = (town) => {
|
||||||
export const getSupervisorInfoCode = () => {
|
export const getSupervisorInfoCode = () => {
|
||||||
return queryData({"type": "all_supervisors_info_code", "tag": "member"}, memberActionUrl);
|
return queryData({"type": "all_supervisors_info_code", "tag": "member"}, memberActionUrl);
|
||||||
}
|
}
|
||||||
|
export const getSupervisorInfoCodeOffline = () => {
|
||||||
|
return queryData({"type": "supervisors_infos_off_line", "tag": "member"}, memberActionUrl);
|
||||||
|
}
|
||||||
export const generateAgentGeo = async (newPhone) => {
|
export const generateAgentGeo = async (newPhone) => {
|
||||||
const user = await readUser();
|
const user = await readUser();
|
||||||
const items = await queryData({
|
const items = await queryData({
|
||||||
|
@ -408,7 +412,7 @@ export const generateAgentGeo = async (newPhone) => {
|
||||||
}, memberActionUrl)
|
}, memberActionUrl)
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
export const AssignAgentGeo = async (codeValidation, phone, taxes, id_agent, password, id_tax_notice) => {
|
export const AssignAgentGeo = async (codeValidation, phone, taxes, id_agent, password, id_tax_notice, neighborhood) => {
|
||||||
const user = await readUser();
|
const user = await readUser();
|
||||||
const items = await queryData({
|
const items = await queryData({
|
||||||
"type": "assignNetworkAgentToGeo",
|
"type": "assignNetworkAgentToGeo",
|
||||||
|
@ -420,7 +424,8 @@ export const AssignAgentGeo = async (codeValidation, phone, taxes, id_agent, pas
|
||||||
"lang": I18n.currentLocale(),
|
"lang": I18n.currentLocale(),
|
||||||
agentId: id_agent,
|
agentId: id_agent,
|
||||||
password,
|
password,
|
||||||
id_tax_notice
|
id_tax_notice,
|
||||||
|
neighborhood
|
||||||
}, memberActionUrl)
|
}, memberActionUrl)
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
export const isDebugMode = false
|
export const isDebugMode = false
|
||||||
|
|
||||||
|
// TODO: Switch from test to prod and vice versa
|
||||||
|
|
||||||
// PROD URL
|
// PROD URL
|
||||||
// export const baseUrl = "https://city-douala3.ilink-app.com:8080/mobilebackend";
|
export const baseUrl = "https://city-douala4.ilink-app.com:8080/mobilebackend";
|
||||||
// export const testBaseUrl= "https://city-douala3.ilink-app.com:8081";
|
export const testBaseUrl= "https://city-douala4.ilink-app.com:8081";
|
||||||
|
|
||||||
// TEST URL
|
// TEST URL
|
||||||
export const baseUrl = "https://test-city-douala3.ilink-app.com:9080/mobilebackend";
|
// export const baseUrl = "https://test-city-douala4.ilink-app.com:9080/mobilebackend";
|
||||||
export const testBaseUrl= "https://test-city-douala3.ilink-app.com:9081";
|
// export const testBaseUrl= "https://test-city-douala4.ilink-app.com:9081";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|