From 52b1ed736c0d569a71495ebb81c948bb942005a5 Mon Sep 17 00:00:00 2001 From: Brice Zele Date: Tue, 19 May 2020 14:37:39 +0100 Subject: [PATCH] everything is ok --- android/app/src/main/assets/index.android.bundle | 4 ++-- screens/groupes/SuperViseurGroupeHome.js | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle index 520a0799..9aeb6a30 100644 --- a/android/app/src/main/assets/index.android.bundle +++ b/android/app/src/main/assets/index.android.bundle @@ -739,7 +739,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);m.exports=(function(){"use s __d(function(g,r,i,a,m,e,d){var t=r(d[0]),o=r(d[1]);function n(t,o,n){this.db=t,this.query=o||{},n&&(this.execFn=n)}n.prototype.limit=function(t){return this._limit=t,this},n.prototype.skip=function(t){return this._skip=t,this},n.prototype.sort=function(t){return this._sort=t,this},n.prototype.projection=function(t){return this._projection=t,this},n.prototype.project=function(n){var s,c,u,h=[],p=this;return void 0===this._projection||0===Object.keys(this._projection).length?n:(s=0!==this._projection._id,this._projection=o.omit(this._projection,'_id'),(u=Object.keys(this._projection)).forEach(function(t){if(void 0!==c&&p._projection[t]!==c)throw new Error("Can't both keep and omit fields except for _id");c=p._projection[t]}),n.forEach(function(o){var n;1===c?(n={$set:{}},u.forEach(function(s){n.$set[s]=t.getDotValue(o,s),void 0===n.$set[s]&&delete n.$set[s]}),n=t.modify({},n)):(n={$unset:{}},u.forEach(function(t){n.$unset[t]=!0}),n=t.modify(o,n)),s?n._id=o._id:delete n._id,h.push(n)}),h)},n.prototype._exec=function(o){var n,s,c,u=[],h=0,p=0,f=this,_=null;function l(t,n){return f.execFn?f.execFn(t,n,o):o(t,n)}this.db.getCandidates(this.query,function(o,y){if(o)return l(o);try{for(n=0;np)p+=1;else if(u.push(y[n]),h+=1,f._limit&&f._limit<=h)break}catch(o){return l(o)}if(f._sort){s=Object.keys(f._sort);var j=[];for(n=0;n0&&this._events[h].length>l&&(this._events[h].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[h].length),'function'==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!s(n))throw TypeError('listener must be a function');var o=!1;function h(){this.removeListener(t,h),o||(o=!0,n.apply(this,arguments))}return h.listener=n,this.on(t,h),this},t.prototype.removeListener=function(t,o){var h,v,l,u;if(!s(o))throw TypeError('listener must be a function');if(!this._events||!this._events[t])return this;if(l=(h=this._events[t]).length,v=-1,h===o||s(h.listener)&&h.listener===o)delete this._events[t],this._events.removeListener&&this.emit('removeListener',t,o);else if(n(h)){for(u=l;u-- >0;)if(h[u]===o||h[u].listener&&h[u].listener===o){v=u;break}if(v<0)return this;1===h.length?(h.length=0,delete this._events[t]):h.splice(v,1),this._events.removeListener&&this.emit('removeListener',t,o)}return this},t.prototype.removeAllListeners=function(t){var n,o;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)'removeListener'!==n&&this.removeAllListeners(n);return this.removeAllListeners('removeListener'),this._events={},this}if(s(o=this._events[t]))this.removeListener(t,o);else if(o)for(;o.length;)this.removeListener(t,o[o.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?s(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.prototype.listenerCount=function(t){if(this._events){var n=this._events[t];if(s(n))return 1;if(n)return n.length}return 0},t.listenerCount=function(t,s){return t.listenerCount(s)}},735,[]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.authKeyData=e.MARKER_URL=e.videoUrl=e.authKeyUrl=e.transferCommission=e.transactionUrl=e.commissionAmount=e.creditCancelDemand=e.creditTreatDemand=e.walletDetailUrl=e.walletActionUrl=e.logoutActionUrl=e.configActionUrl=e.demandeActionUrl=e.locationActionUrl=e.networkActionUrl=e.memberActionUrl=e.adhesionUrl=e.testBaseUrl=e.baseUrl=e.isDebugMode=void 0;e.isDebugMode=!1;e.baseUrl="https://preprod.ilink-app.com:8080/mobilebackend";e.testBaseUrl="https://preprod.ilink-app.com";e.adhesionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/LoginAction.php";e.memberActionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/MembersAction.php";e.networkActionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/NetworkAction.php";e.locationActionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/LocationAction.php";e.demandeActionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/DemandeAction.php";e.configActionUrl="https://preprod.ilink-app.com:8080/mobilebackend/interacted/ConfigAction.php";e.logoutActionUrl="https://preprod.ilink-app.com/logout";e.walletActionUrl="https://preprod.ilink-app.com/walletService/wallets";e.walletDetailUrl="https://preprod.ilink-app.com/walletService/wallets";e.creditTreatDemand="https://preprod.ilink-app.com/walletService/credits/treatDemand";e.creditCancelDemand="https://preprod.ilink-app.com/walletService/credits/cancelDemand";e.commissionAmount="https://preprod.ilink-app.com/walletService/transactions/commission";e.transactionUrl="https://preprod.ilink-app.com/walletService/transactions";e.transferCommission="https://preprod.ilink-app.com/walletService/virement";e.authKeyUrl="https://preprod.ilink-app.com/oauth/token";e.videoUrl="https://www.youtube.com/watch?v=wwGPDPsSLWY";e.MARKER_URL="https://preprod.ilink-app.com:8080/mobilebackend/interacted/LocationAction.php";e.authKeyData={grant_type:"password",client_id:"2",client_secret:"rrbvxACJPBOG4cqjDNlstSljlmjydLon3P55JMav"}},736,[]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.authKeyData=e.MARKER_URL=e.videoUrl=e.authKeyUrl=e.transferCommission=e.transactionUrl=e.commissionAmount=e.creditCancelDemand=e.creditTreatDemand=e.walletDetailUrl=e.walletActionUrl=e.logoutActionUrl=e.configActionUrl=e.demandeActionUrl=e.locationActionUrl=e.networkActionUrl=e.memberActionUrl=e.adhesionUrl=e.testBaseUrl=e.baseUrl=e.isDebugMode=void 0;e.isDebugMode=!1;e.baseUrl="http://test.ilink-app.com:8080/mobilebackend";e.testBaseUrl="https://test.ilink-app.com";e.adhesionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/LoginAction.php";e.memberActionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/MembersAction.php";e.networkActionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/NetworkAction.php";e.locationActionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/LocationAction.php";e.demandeActionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/DemandeAction.php";e.configActionUrl="http://test.ilink-app.com:8080/mobilebackend/interacted/ConfigAction.php";e.logoutActionUrl="https://test.ilink-app.com/logout";e.walletActionUrl="https://test.ilink-app.com/walletService/wallets";e.walletDetailUrl="https://test.ilink-app.com/walletService/wallets";e.creditTreatDemand="https://test.ilink-app.com/walletService/credits/treatDemand";e.creditCancelDemand="https://test.ilink-app.com/walletService/credits/cancelDemand";e.commissionAmount="https://test.ilink-app.com/walletService/transactions/commission";e.transactionUrl="https://test.ilink-app.com/walletService/transactions";e.transferCommission="https://test.ilink-app.com/walletService/virement";e.authKeyUrl="https://test.ilink-app.com/oauth/token";e.videoUrl="https://www.youtube.com/watch?v=wwGPDPsSLWY";e.MARKER_URL="http://test.ilink-app.com:8080/mobilebackend/interacted/LocationAction.php";e.authKeyData={grant_type:"password",client_id:"2",client_secret:"rrbvxACJPBOG4cqjDNlstSljlmjydLon3P55JMav"}},736,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),u=t(r(d[2])),s=t(r(d[3])),c=r(d[4]),o=r(d[5]),l=(function(){function t(){(0,u.default)(this,t),this.setCurrentPas=function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,n.default.awrap(o.AsyncStorage.setItem('@config:pasObject',JSON.stringify(t.pas)));case 3:u.next=8;break;case 5:u.prev=5,u.t0=u.catch(0),console.warn(u.t0);case 8:c.db.update({"configuration.pas":{$exists:!0}},{configuration:{pas:t.pas}},{upsert:!0},function(t,n,u){console.log([t,n,u])});case 9:case"end":return u.stop()}},null,null,[[0,5]],Promise)},this._getPasData=function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('@config:pasObject'));case 3:s=c.sent,t(JSON.parse(s)),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})},this._storeData=function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,n.default.awrap(o.AsyncStorage.setItem('@config:lang',t.value));case 3:u.next=8;break;case 5:u.prev=5,u.t0=u.catch(0),console.warn(u.t0);case 8:case"end":return u.stop()}},null,null,[[0,5]],Promise)},this._getData=function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('@config:lang'));case 3:s=c.sent,t(s),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})}}return(0,s.default)(t,[{key:"getCurrentLangue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(_getData());case 2:(t=u.sent)?resolve(t):reject(t);case 4:case"end":return u.stop()}},null,null,null,Promise)}},{key:"getCurrentPasValue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(this._getPasData());case 2:if(!(t=u.sent)){u.next=7;break}return u.abrupt("return",t.valeur_int);case 7:return u.abrupt("return",t);case 8:case"end":return u.stop()}},null,this,null,Promise)}},{key:"getCurrentPubValue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(this._getPubData());case 2:if(t=u.sent,console.warn(t),!t){u.next=8;break}return u.abrupt("return",t.valeur_bool);case 8:return u.abrupt("return",t);case 9:case"end":return u.stop()}},null,this,null,Promise)}},{key:"setPubActive",value:function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(u.prev=0,!t.pub){u.next=5;break}return u.next=4,n.default.awrap(o.AsyncStorage.setItem('pubObject',JSON.stringify(t.pub)));case 4:c.db.update({"configuration.pub":{$exists:!0}},{configuration:{pub:t.pub}},{upsert:!0},function(t,n,u){console.log([t,n,u])});case 5:u.next=10;break;case 7:u.prev=7,u.t0=u.catch(0),console.warn(u.t0);case 10:case"end":return u.stop()}},null,null,[[0,7]],Promise)}},{key:"_getPubData",value:function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('pubObject'));case 3:s=c.sent,t(JSON.parse(s)),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})}},{key:"setCurrentLangue",value:function(t){this._storeData(t),c.db.update({"configuration.lang":{$exists:!0}},{configuration:{lang:t}},{upsert:!0},function(t,n,u){console.log([t,n,u])})}}]),t})();e.default=l},737,[1,273,8,9,714,18]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o={};o.DBEvents=new t,o.create_db=function(t){var u=this;u.db_name=t,u.get=function(t,o){n.table(u.db_name).then(function(n){var u=n.where(t).find();o&&o(u)})},u.get_id=function(t,o){n.table(u.db_name).then(function(n){var u=n.get(t);o&&o(u)})},u.get_all=function(t){n.table(u.db_name).then(function(n){var o=n.databaseData[u.db_name];t&&t(o)})},u.add=function(t,f){n.table(u.db_name).then(function(n){n.add(t,function(n){f&&f(n),o.DBEvents.emit("all")})})},u.add_all=function(n,t){if(n.length<=0)return null;var o=[];!(function n(f){if(0==f.length&&t)return t(o);var c=f.pop();u.add(c,function(t){n(f),o.push(t)})})(n)},u.remove=function(t,o){n.table(u.db_name).then(function(n){n.where(t).remove(function(n){o&&o(n)})})},u.remove_id=function(t,f){n.table(u.db_name).then(function(n){n.removeById(t,function(n){f&&f(n),o.DBEvents.emit("all")})})},u.erase_db=function(t){n.table(u.db_name).then(function(n){n.remove(function(n){t&&t(n),o.DBEvents.emit("all")})})},u.update=function(t,f,c){n.table(u.db_name).then(function(n){n.where(t).update(f,function(n){c&&c(n),o.DBEvents.emit("all")})})},u.update_id=function(t,f,c){n.table(u.db_name).then(function(n){n.updateById(t,f,function(n){c&&c(n),o.DBEvents.emit("all")})})},u.remove_id=function(t,f){n.table(u.db_name).then(function(n){n.removeById(t,function(n){f&&f(n),o.DBEvents.emit("all")})})}},m.exports=o},738,[739,742]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]).Promise,n=t.AsyncStorage,h={},o=function(t,s){return this.tableName=t,this.databaseData=s,this._where=null,this._limit=100,this._offset=0,this};h.createDataBase=function(){return new s(function(t,s){n.setItem("db_store",JSON.stringify({}),function(n){n?s(n):t()})})},h.saveTable=function(t,h){var o=this;return new s(function(s,f){o.getItem("db_store").then(function(o){o[t]=h||{totalrows:0,autoinc:1,rows:{}},n.setItem("db_store",JSON.stringify(o),function(t){t?f(t):s(o)})})})},h.table=function(t){var n=this;return new s(function(s,h){return n.getItem("db_store").then(function(h){if(h)if(h[t]){var f=new o(t,h||{});s(f)}else n.saveTable(t).then(function(n){var h=new o(t,n||{});s(h)});else n.createDataBase().then(function(){n.saveTable(t).then(function(n){var h=new o(t,n||{});s(h)})})})})},h.getItem=function(t){return new s(function(s,h){n.getItem(t,function(t,n){t?h(t):s(JSON.parse(n))})})},o.prototype.where=function(t){return this._where=t||null,this},o.prototype.limit=function(t){return this._limit=t||100,this},o.prototype.offset=function(t){return this._offset=t||0,this},o.prototype.init=function(){return this.where(),this.limit(),this.offset(),this},o.prototype.update=function(t,s){var n=[],o=this.databaseData[this.tableName].rows,f=!1;if(this._where&&(f=!0),f){for(var u in o){var l=!0;for(var b in this._where)o[u][b]!=this._where[b]&&(l=!1);if(l)for(var c in n.push(this.databaseData[this.tableName].rows[u]._id),t)this.databaseData[this.tableName].rows[u][c]=t[c]}h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(t){s&&s(t)},function(t){s&&s(t)}),this.init()}else s&&s(null)},o.prototype.updateById=function(t,s,n){return this.where({_id:t}),this.update(s,n)},o.prototype.remove=function(t){var s=[],n=this.databaseData[this.tableName].rows,o=[],f=!1;this._where&&(f=!0);var u=0;if(f)for(var l in n){var b=!0;for(var c in this._where)n[l][c]!=this._where[c]&&(b=!1);b&&(u+=1,o.push(this.databaseData[this.tableName].rows[l]._id),delete this.databaseData[this.tableName].rows[l],this.databaseData[this.tableName].totalrows--)}else for(var l in u=0,n)u+=1,o.push(this.databaseData[this.tableName].rows[l]._id),delete this.databaseData[this.tableName].rows[l],this.databaseData[this.tableName].totalrows--;this.init(),u===o.length&&t?h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(s){t&&t({results:s,deleted_ids:o})},function(n){(s.push(n),t)&&t({error:n,deleted_ids:o})}):t&&0===o.length&&t(null)},o.prototype.removeById=function(t,s){return this.where({_id:t}),this.remove(s)},o.prototype.add=function(t,s){var n=this.databaseData[this.tableName].autoinc;t._id=n,this.databaseData[this.tableName].rows[n]=t,this.databaseData[this.tableName].autoinc+=1,this.databaseData[this.tableName].totalrows+=1,h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(n){s&&s(t)},function(t){s&&s(t)}),this.init()},o.prototype.get=function(t){return this.where({_id:t}),this.find(1)},o.prototype.find=function(){var t=[],s=this.databaseData[this.tableName].rows,n=!1;if(this._where&&(n=!0),n)for(var h in s){var o=!1;for(var f in this._where){if(s[h][f]!=this._where[f]){o=!1;break}o=!0}o&&t.push(s[h])}else for(var h in s)t.push(s[h]);return'number'==typeof this._limit?t.slice(this._offset,this._limit+this._offset):(this.init(),t)},m.exports=h},739,[18,740]); @@ -1597,7 +1597,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{ __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=t(r(d[2])),l=t(r(d[3])),c=t(r(d[4])),f=t(r(d[5])),u=t(r(d[6])),p=t(r(d[7])),s=t(r(d[8])),b=t(r(d[9])),y=r(d[10]);function O(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,l)}return o}var h=(function(t){function n(){return(0,l.default)(this,n),(0,f.default)(this,(0,u.default)(n).apply(this,arguments))}return(0,p.default)(n,t),(0,c.default)(n,[{key:"render",value:function(){var t=this.props,n=t.label,l=(0,o.default)(t,["label"]);return b.default.createElement(y.View,{style:w.switchWrapper},b.default.createElement(y.Text,{style:w.label},n),b.default.createElement(y.Switch,l))}}]),n})(b.default.PureComponent);e.default=h,h.propTypes=(function(t){for(var o=1;o0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.demands,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[I.theme.primary,I.theme.purpleLight,I.theme.reddeconnect,I.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,b.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(v.default,{style:B.lottie,source:r(d[40]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:B.text},L.default.t('NO_MEMBERS'))))}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_DEMAND_ADHESION')))}},{key:"_renderLoadingDemandItems",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderAddhesionItem",value:function(t){var n=this;return h.default.createElement(S.Card,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(S.CardContent,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('NAME')," :")," ",t.lastname),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('PHONE_NUMBER')," :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('EMAIL')," :")," ",t.email),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('NETWORK')," :")," ",t.network))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{title:L.default.t('ACTIVE_USER'),onPress:function(){(0,p.acceptDemandAdhesion)(t).then(function(l){E.Alert.alert(L.default.t('ACTIVATE_ACCOUNT'),L.default.t('THE_ACCOUNT')+' '+t.lastname+" "+L.default.t('ACTIVATED'),[{text:"Ok"}]);var o=n.state.demands;o.splice(o.indexOf(t),1),n.setState({demands:o})})},color:"green"}),h.default.createElement(S.CardButton,{title:L.default.t('DELETE_GEOLOCATED_USER'),color:"red",onPress:function(){}})))}},{key:"_renderListCodeUnused",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderFreeCodeItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderFreeCodeItem",value:function(t){return console.log(t),h.default.createElement(E.View,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(E.View,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"Contact :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Membre :")," ",t.code_membre),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Validation :")," ",t.validation_code)))}}],[{key:"initState",value:function(){return{enabledListMembers:!0,listmembers:[],usersicon:null,isLoadingDemand:!0,charticon:null,isRefreshing:!1,user:{},freeCodes:[],isLoading:!0}}}]),n})(y.default);e.default=V,V.navigatorStyle={tabBarHidden:!1,topTabTextColor:'#ffffff',topTabsHeight:70,topTabTextFontFamily:'BioRhyme-Bold',selectedTopTabTextColor:'#ff505c',statusBarColor:I.theme.primaryDark,navBarBackgroundColor:I.theme.primary,navBarTextColor:'white',navBarButtonColor:'white',topTabIconColor:'#ffffff',selectedTopTabIconColor:'#ff505c',selectedTopTabIndicatorHeight:2*E.PixelRatio.get(),selectedTopTabIndicatorColor:'#ff505c'},V.navigationOptions=function(t){var n=t.navigation;return{title:L.default.t("GROUP_MANAGE"),drawerLabel:n.getParam("name",L.default.t('GROUP_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(x.default,{name:'people',size:24})}}};var B=E.StyleSheet.create({circlePoint:{width:50,height:50,marginRight:5,alignItems:'center',justifyContent:'center'},container:{flex:1,backgroundColor:'white'},fromNow:{color:I.theme.accentLight},callIcon:{marginRight:5},phone:{textAlign:'center',color:"white"},balanceMember:{marginLeft:7,fontSize:18,fontWeight:"bold",color:I.theme.primary},balanceIcon:{},name:{color:'black',fontSize:20,margin:20,fontWeight:'bold'},surname:{fontSize:17,marginLeft:20},text:{fontSize:17,fontWeight:'bold'},lottie:{width:248,height:248}})},1594,[4,1,8,10,12,11,9,13,15,18,815,527,1595,1001,711,869,871,1596,815,712,832,937,1600,1008,1142,1143,1144,1145,1146,1147,1148,840,766,930,1150,1593,1603,808,807,1134,1604]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),c=n(r(d[5])),u=n(r(d[6])),f=n(r(d[7])),h=t(r(d[8])),E=r(d[9]),y=n(r(d[10])),C=r(d[11]),p=r(d[12]),T=r(d[13]),b=r(d[14]),_=n(r(d[15])),x=n(r(d[16])),I=(n(r(d[17])),r(d[18])),L=n(r(d[19])),v=n(r(d[20])),w=r(d[21]),S=(n(r(d[22])),r(d[23]));r(d[24]),r(d[25]),r(d[26]),r(d[27]),r(d[28]),r(d[29]),r(d[30]);r(d[31]);var k=r(d[32]),A=n(r(d[33])),R=r(d[34]),M=r(d[35]),O=r(d[36]);r(d[37]);r(d[38]);var P=r(d[39]),V=(function(t){function n(t){var u;return(0,l.default)(this,n),(u=(0,o.default)(this,(0,s.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([_.default.getImageSource('users',30),_.default.getImageSource('chart-pie',30)]).then(function(n){n[0],n[0],t(n)}).catch(function(t){console.log(t),n(t)}).done()})},u.state=n.initState(),(0,b.readUser)().then(function(t){u.setState({user:t}),(0,T.listFreeCodesSuperViseur)(t.code_membre).then(function(t){console.log("codes",t),void 0!=t.success&&u.setState({freeCodes:t.networks})})}),(0,p.listAllMembers)().then(function(t){console.log(t),null!==t&&u.setState({listmembers:t,isLoading:!1,isRefreshing:!1})}),u._populateIcons().then(function(t){u.setState({usersicon:t[0],charticon:t[1]})}),(0,b.listDemandAdhesion)().then(function(t){console.log(t);var n=[];t.forEach(function(t){var l=!1;n.forEach(function(n){n.code_membre===t.code_membre&&(l=!0)}),l||n.push(t)}),console.log('filtered',n),void 0!==t&&u.setState({demands:n,isLoadingDemand:!1})}),k.IlinkEmitter.on("langueChange",u.updateLangue.bind((0,c.default)(u))),u.currentLocale=A.default.getDeviceLocale().includes("fr")?"fr":"en-gb",P.locale(u.currentLocale),u}return(0,f.default)(n,t),(0,u.default)(n,null,[{key:"options",value:function(t){return{topBar:{rightButtons:[]}}}}]),(0,u.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:L.default.t('GROUP_MANAGE')}),this.forceUpdate()}},{key:"render",value:function(){return h.default.createElement(E.View,{style:{flex:1,marginBottom:10}},h.default.createElement(E.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!1}),h.default.createElement(w.IndicatorViewPager,{style:{flex:1},indicator:'hyper'===this.state.user.category?this._renderTabIndicatorAdmin():this._renderTabIndicator()},this.state.isLoading?this._renderLoadingItems():this._renderListMembers(),this.state.isLoadingDemand?this._renderLoadingItems():'hyper'===this.state.user.category?this._renderListDemandAdhesion():this._renderListCodeUnused()))}},{key:"_renderTabIndicatorAdmin",value:function(){var t=[{text:L.default.t('MEMBER_LIST'),iconSource:this.state.usersicon},{text:L.default.t('MEMBERSHIP_REQUEST'),iconSource:this.state.charticon}];return h.default.createElement(w.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabIndicator",value:function(){var t=[{text:L.default.t('MEMBER_LIST'),iconSource:this.state.usersicon}];return h.default.createElement(w.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderListMembers",value:function(){var t=this;return h.default.createElement(E.View,null,h.default.createElement(E.FlatList,{style:{flex:1,backgroundColor:'#EEE'},data:this.state.listmembers instanceof Array?this.state.listmembers:this.state.listmembers.datas?this.state.listmembers.datas:[],ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(v.default,{style:B.lottie,source:r(d[40]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:B.text},L.default.t('NO_MEMBERS'))))},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[I.theme.primary,I.theme.purpleLight,I.theme.reddeconnect,I.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,p.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),renderItem:function(n){var l=n.item;return t.renderMembers(l)}}))}},{key:"_renderLoadingItems",value:function(){return h.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.ProgressBarAndroid,null))}},{key:"renderMembers",value:function(t){var n=this,l=P.tz(t.created_at,'Etc/GMT+0').format();return l=P(l).fromNow(),h.default.createElement(S.Card,null,h.default.createElement(S.CardTitle,{title:t.lastname,subtitle:t.adresse}),h.default.createElement(S.CardContent,null,h.default.createElement(E.View,{style:{flexDirection:'row',justifyContent:'space-between'}},h.default.createElement(E.View,{style:{flex:1,alignItems:'flex-start'}},h.default.createElement(E.View,{style:{flexDirection:'row',backgroundColor:I.theme.primary,justifyContent:'center',marginRight:10,width:160,marginTop:5,alignItems:'center',borderRadius:10}},h.default.createElement(_.default,{name:"phone",color:"white",size:24,style:B.callIcon}),h.default.createElement(E.Text,{style:B.phone},t.phone))),h.default.createElement(E.View,{style:{width:1,backgroundColor:R.Color.borderColor,marginTop:-20}}),h.default.createElement(E.View,{style:{flex:1,flexDirection:'column',marginTop:-15}},h.default.createElement(E.View,{style:{flexDirection:'row',alignItems:'center',marginTop:-10}},h.default.createElement(E.View,{style:[B.circlePoint,{backgroundColor:R.Color.whiteColor}]},h.default.createElement(x.default,{name:"md-wallet",size:32,color:R.Color.primaryColor})),h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:(M.Typography.title3,R.Color.primaryColor,{marginBottom:1})},L.default.t('PRINCIPAL_ACCOUNT_TITLE')),h.default.createElement(E.Text,{style:[M.Typography.body2]},null===t.balance_princ?0:(0,O.thousandsSeparators)(t.balance_princ)))),h.default.createElement(E.View,{style:{flexDirection:'row',alignItems:'center',marginTop:-10}},h.default.createElement(E.View,{style:[B.circlePoint,{backgroundColor:R.Color.whiteColor}]},h.default.createElement(x.default,{name:"md-cash",size:32,color:R.Color.primaryColor})),h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:(M.Typography.title3,R.Color.primaryColor,{marginBottom:1})},L.default.t('COMMISSION_ACCOUNT_TITLE')),h.default.createElement(E.Text,{style:M.Typography.body2},null===t.balance_com?0:(0,O.thousandsSeparators)(t.balance_com))))))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{onPress:function(){E.Alert.alert(L.default.t("TITLE_SUPPRESS_CONFIRM"),L.default.t("TEXT_SUPPRESS_CONFIRM"),[{text:L.default.t('NO'),onPress:function(){}},{text:L.default.t('YES'),onPress:function(){(0,b.deleteUser)(t).then(function(){n.setState({isLoading:!0}),(0,p.listAllMembers)().then(function(t){console.log(t),null!==t&&n.setState({listmembers:t,isLoading:!1,isRefreshing:!1})})})},style:'cancel'}])},title:L.default.t('DELETE_GEOLOCATED_USER'),color:"crimson"})))}},{key:"_renderListDemandAdhesion",value:function(){var t=this;if('hyper'===this.state.user.category)return this.state.demands.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.demands,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[I.theme.primary,I.theme.purpleLight,I.theme.reddeconnect,I.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,p.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(v.default,{style:B.lottie,source:r(d[40]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:B.text},L.default.t('NO_MEMBERS'))))}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_DEMAND_ADHESION')))}},{key:"_renderLoadingDemandItems",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderAddhesionItem",value:function(t){var n=this;return h.default.createElement(S.Card,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(S.CardContent,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('NAME')," :")," ",t.lastname),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('PHONE_NUMBER')," :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('EMAIL')," :")," ",t.email),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},L.default.t('NETWORK')," :")," ",t.network))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{title:L.default.t('ACTIVE_USER'),onPress:function(){(0,b.acceptDemandAdhesion)(t).then(function(l){E.Alert.alert(L.default.t('ACTIVATE_ACCOUNT'),L.default.t('THE_ACCOUNT')+' '+t.lastname+" "+L.default.t('ACTIVATED'),[{text:"Ok"}]);var o=n.state.demands;o.splice(o.indexOf(t),1),n.setState({demands:o})})},color:"green"}),h.default.createElement(S.CardButton,{title:L.default.t('DELETE_GEOLOCATED_USER'),color:"red",onPress:function(){}})))}},{key:"_renderListCodeUnused",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderFreeCodeItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,L.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderFreeCodeItem",value:function(t){return console.log(t),h.default.createElement(E.View,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(E.View,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"Contact :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Membre :")," ",t.code_membre),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Validation :")," ",t.validation_code)))}}],[{key:"initState",value:function(){return{enabledListMembers:!0,listmembers:[],usersicon:null,isLoadingDemand:!0,charticon:null,isRefreshing:!1,user:{},freeCodes:[],isLoading:!0}}}]),n})(y.default);e.default=V,V.navigatorStyle={tabBarHidden:!1,topTabTextColor:'#ffffff',topTabsHeight:70,topTabTextFontFamily:'BioRhyme-Bold',selectedTopTabTextColor:'#ff505c',statusBarColor:I.theme.primaryDark,navBarBackgroundColor:I.theme.primary,navBarTextColor:'white',navBarButtonColor:'white',topTabIconColor:'#ffffff',selectedTopTabIconColor:'#ff505c',selectedTopTabIndicatorHeight:2*E.PixelRatio.get(),selectedTopTabIndicatorColor:'#ff505c'},V.navigationOptions=function(t){var n=t.navigation;return{title:L.default.t("GROUP_MANAGE"),drawerLabel:n.getParam("name",L.default.t('GROUP_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(_.default,{name:'people',size:24})}}};var B=E.StyleSheet.create({circlePoint:{width:50,height:50,marginRight:5,alignItems:'center',justifyContent:'center'},container:{flex:1,backgroundColor:'white'},fromNow:{color:I.theme.accentLight},callIcon:{marginRight:5},phone:{textAlign:'center',color:"white"},balanceMember:{marginLeft:7,fontSize:18,fontWeight:"bold",color:I.theme.primary},balanceIcon:{},name:{color:'black',fontSize:20,margin:20,fontWeight:'bold'},surname:{fontSize:17,marginLeft:20},text:{fontSize:17,fontWeight:'bold'},lottie:{width:248,height:248}})},1594,[4,1,8,10,12,11,9,13,15,18,815,527,1595,1001,711,869,871,1596,815,712,832,937,1600,1008,1142,1143,1144,1145,1146,1147,1148,840,766,930,1150,1593,1603,808,807,1134,1604]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.listAllMembers=void 0;var o=n(r(d[2])),l=(t(r(d[3])),r(d[4])),s=n(r(d[5])),c=r(d[6]);r(d[7]).DBEvents,r(d[8]);e.listAllMembers=function(){var t,n,u,p,b,f;return o.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,o.default.awrap((0,l.readUser)());case 2:if(null===(t=v.sent)){v.next=24;break}return n=s.default.currentLocale(),u={tag:"member",id:t.code_membre,la:n,test:c.isDebugMode,codeparrain:t.code_membre,type:'all_geolocated'},console.log("DATA to SEND",u),v.next=9,o.default.awrap(fetch(c.memberActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(u)}));case 9:return p=v.sent,b="",v.prev=11,v.next=14,o.default.awrap(p.text());case 14:return b=v.sent,v.abrupt("return",JSON.parse(b));case 18:return v.prev=18,v.t0=v.catch(11),console.log(v.t0),console.log("error when liste member",b),f={error:-3,content:v.t0,text:b},v.abrupt("return",f);case 24:return v.abrupt("return",null);case 25:case"end":return v.stop()}},null,null,[[11,18]],Promise)}},1595,[4,1,273,15,711,712,736,738,714]); __d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(t){for(var n=1;nt.props.sensitivity&&Math.abs(o.dy)<=t.props.sensitivity},onPanResponderGrant:this._handlePanResponderGrant,onPanResponderMove:this._handlePanResponderMove,onPanResponderRelease:this._handlePanResponderEnd,onPanResponderTerminate:this._handlePanResponderEnd,onShouldBlockNativeResponder:function(t,n){return!1},onPanResponderTerminationRequest:function(){return!1}})},componentWillReceiveProps:function(t){t.close&&this._close(),t.openRight&&this._openRight(),t.openLeft&&this._openLeft()},_handlePanResponderGrant:function(t,n){var o=this;this.props.disabled||(this.state.openedLeft||this.state.openedRight?this._callOnClose():this._callOnOpen(),this.refs.swipeoutContent.measure(function(t,n,s,h){var p=o.props.buttonWidth||s/5;o.setState({btnWidth:p,btnsLeftWidth:o.props.left?p*o.props.left.length:0,btnsRightWidth:o.props.right?p*o.props.right.length:0,swiping:!0,timeStart:(new Date).getTime()})}))},_handlePanResponderMove:function(t,n){if(!this.props.disabled){var o=n.dx,s=n.dy,h=this.state.btnsLeftWidth,p=this.state.btnsRightWidth;if(this.state.openedRight)o=n.dx-p;else if(this.state.openedLeft)o=n.dx+h;var l=Math.abs(o)>Math.abs(s);this.props.scroll&&(l?this.props.scroll(!1):this.props.scroll(!0)),this.state.swiping&&(o<0&&this.props.right?this.setState({contentPos:Math.min(o,0)}):o>0&&this.props.left&&this.setState({contentPos:Math.max(o,0)}))}},_handlePanResponderEnd:function(t,n){if(!this.props.disabled){var o=n.dx,s=this.state.contentPos,h=this.state.contentWidth,p=this.state.btnsLeftWidth,l=this.state.btnsRightWidth,u=.33*h,f=o>u||o>p/2,c=o<-u||o<-l/2;if(this.state.openedRight)c=o-u<-u;if(this.state.openedLeft)f=o+u>u;if((new Date).getTime()-this.state.timeStart<200)c=o<-u/10&&!this.state.openedLeft,f=o>u/10&&!this.state.openedRight;this.state.swiping&&(c&&s<0&&o<0?this._open(-l,'right'):f&&s>0&&o>0?this._open(p,'left'):this._close()),this.props.scroll&&this.props.scroll(!0)}},_tweenContent:function(t,o){this.tweenState(t,{easing:n.default.easingTypes.easeInOutQuad,duration:0===o?1.5*this.state.tweenDuration:this.state.tweenDuration,endValue:o})},_rubberBandEasing:function(t,n){return t<0&&t0&&t>n?n+Math.pow(t-n,.85):t},_autoClose:function(t){this.state.autoClose&&this._close();var n=t.onPress;n&&n()},_open:function(t,n){var o='left'===n,s=this.props,h=s.sectionID,p=s.rowID,l=s.onOpen;l&&l(h,p,n),this._tweenContent('contentPos',t),this.setState({contentPos:t,openedLeft:o,openedRight:!o,swiping:!1})},_close:function(){var t=this.props,n=t.sectionID,o=t.rowID,s=t.onClose;s&&(this.state.openedLeft||this.state.openedRight)&&s(n,o,this.state.openedRight?'right':'left');this._tweenContent('contentPos',0),this._callOnClose(),this.setState({openedRight:!1,openedLeft:!1,swiping:!1})},_callOnClose:function(){this.props.onClose&&this.props.onClose(this.props.sectionID,this.props.rowID)},_callOnOpen:function(){this.props.onOpen&&this.props.onOpen(this.props.sectionID,this.props.rowID)},_openRight:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsRightWidth:t.props.right?p*t.props.right.length:0},function(){t._tweenContent('contentPos',-t.state.btnsRightWidth),t._callOnOpen(),t.setState({contentPos:-t.state.btnsRightWidth,openedLeft:!1,openedRight:!0,swiping:!1})})})},_openLeft:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsLeftWidth:t.props.left?p*t.props.left.length:0},function(){t._tweenContent('contentPos',t.state.btnsLeftWidth),t._callOnOpen(),t.setState({contentPos:t.state.btnsLeftWidth,openedLeft:!0,openedRight:!1,swiping:!1})})})},render:function(){var n=this.state.contentWidth,o=this.getTweeningValue('contentPos'),p=[s.default.swipeout,this.props.style];this.props.backgroundColor&&p.push([{backgroundColor:this.props.backgroundColor}]);var l=-this.state.btnsRightWidth;if(o>0)l=this.state.btnsLeftWidth;var f={left:{left:0,overflow:'hidden',width:Math.min(l*(o/l),l)}},c={right:{left:Math.abs(n+Math.max(l,o)),right:0}},b={content:{transform:[{translateX:this._rubberBandEasing(o,l)}]}},w=[s.default.swipeoutContent];w.push(b.content);var y=[s.default.swipeoutBtns];y.push(c.right);var _=[s.default.swipeoutBtns];_.push(f.left);var R=o<0,v=o>0;return h.default.createElement(u.View,{style:p},h.default.createElement(u.View,t({ref:'swipeoutContent',style:w,onLayout:this._onLayout},this._panResponder.panHandlers),this.props.children),this._renderButtons(this.props.right,R,y),this._renderButtons(this.props.left,v,_))},_onLayout:function(t){var n=t.nativeEvent.layout,o=n.width,s=n.height;this.setState({contentWidth:o,contentHeight:s})},_renderButtons:function(t,n,o){return t&&n?h.default.createElement(u.View,{style:o},t.map(this._renderButton)):h.default.createElement(u.View,null)},_renderButton:function(t,n){var o=this;return h.default.createElement(c,{backgroundColor:t.backgroundColor,color:t.color,component:t.component,disabled:t.disabled,height:this.state.contentHeight,key:n,onPress:function(){return o._autoClose(t)},text:t.text,type:t.type,underlayColor:t.underlayColor,width:this.state.btnWidth})}});b.NativeButton=o.default,b.SwipeoutButton=c,e.default=b},1596,[1597,1598,1599,15,68,212,18]); __d(function(g,r,i,a,m,e,d){var n,t;n=this,t=function(){return(function(n){function t(o){if(u[o])return u[o].exports;var c=u[o]={exports:{},id:o,loaded:!1};return n[o].call(c.exports,c,c.exports,t),c.loaded=!0,c.exports}var u={};return t.m=n,t.c=u,t.p="",t(0)})({0:function(n,t,u){n.exports=u(90)},1:function(n,t){function u(){v=!1,f.length?h=f.concat(h):p=-1,h.length&&o()}function o(){if(!v){var n=setTimeout(u);v=!0;for(var t=h.length;t;){for(f=h,h=[];++p1)for(var u=1;uv.duration?v.duration:Math.max(0,s-h);u+=(0===v.duration?v.endValue:v.easing(p,v.beginValue,v.endValue,v.duration))-v.endValue}}return u},_rafCb:function(){var n=this.state;if(0!==n.tweenQueue.length){for(var t=Date.now(),u=[],o=0;on?c*Math.pow(2,10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*-.5+t:c*Math.pow(2,-10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*.5+l+t)},easeInBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*(n/=o)*n*((c+1)*n-c)+t},easeOutBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*((n=n/o-1)*n*((c+1)*n+c)+1)+t},easeInOutBack:function(n,t,u,o,c){var s=u-t;return void 0===c&&(c=1.70158),(n/=o/2)<1?s/2*(n*n*((1+(c*=1.525))*n-c))+t:s/2*((n-=2)*n*((1+(c*=1.525))*n+c)+2)+t},easeInBounce:function(n,t,o,c){var s=o-t;return s-u.easeOutBounce(c-n,0,s,c)+t},easeOutBounce:function(n,t,u,o){var c=u-t;return(n/=o)<.36363636363636365?c*(7.5625*n*n)+t:.7272727272727273>n?c*(7.5625*(n-=.5454545454545454)*n+.75)+t:.9090909090909091>n?c*(7.5625*(n-=.8181818181818182)*n+.9375)+t:c*(7.5625*(n-=.9545454545454546)*n+.984375)+t},easeInOutBounce:function(n,t,o,c){var s=o-t;return c/2>n?.5*u.easeInBounce(2*n,0,s,c)+t:.5*u.easeOutBounce(2*n-c,0,s,c)+.5*s+t}};n.exports=u}})},"object"==typeof e&&"object"==typeof m?m.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof e?e.tweenState=t():n.tweenState=t()},1597,[]); diff --git a/screens/groupes/SuperViseurGroupeHome.js b/screens/groupes/SuperViseurGroupeHome.js index a8d0855b..638df5de 100644 --- a/screens/groupes/SuperViseurGroupeHome.js +++ b/screens/groupes/SuperViseurGroupeHome.js @@ -287,8 +287,8 @@ export default class SuperViseurGroupeHome extends BaseScreen { backgroundColor: theme.primary, justifyContent: 'center', marginRight: 10, - width: 150, - marginTop: 35, + width: 160, + marginTop: 5, alignItems: 'center', borderRadius: 10, }}> @@ -300,16 +300,17 @@ export default class SuperViseurGroupeHome extends BaseScreen { - + {I18n.t('PRINCIPAL_ACCOUNT_TITLE')} - {thousandsSeparators(item.balance_princ)} + {item.balance_princ === null ? 0 : thousandsSeparators(item.balance_princ)} @@ -333,6 +334,7 @@ export default class SuperViseurGroupeHome extends BaseScreen { style={{ flexDirection: 'row', alignItems: 'center', + marginTop: -10 }}> {I18n.t('COMMISSION_ACCOUNT_TITLE')} - {thousandsSeparators(item.balance_com)} + {item.balance_com === null ? 0 : thousandsSeparators(item.balance_com)}