Merged feature/input_phone into dev

This commit is contained in:
xdrm-brackets 2016-05-12 10:46:43 +02:00
commit ad1d781ab0
5 changed files with 77 additions and 30 deletions

View File

@ -17,7 +17,7 @@
{ "contact":"15", "date":"2014-02-15T21:08:34", "duration":"349", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"16", "date":"2014-02-15T20:51:38", "duration":"0", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"17", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"18", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"18", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"MISSED", "type":"PHONE" },
{ "contact":"19", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"20", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" },
{ "contact":"21", "date":"2014-02-15T17:24:18", "duration":"276", "direction":"OUTGOING", "type":"PHONE" },
@ -25,28 +25,28 @@
],
"contacts": [
{ "contact":"1", "number":"0502030405", "name":"", "sexe":"0", "age":"5", "studies":"1", "reltype":"inconnu", "dist":"5" },
{ "contact":"2", "number":"0502030561", "name":"", "sexe":"0", "age":"10", "studies":"2", "reltype":"inconnu", "dist":"5+" },
{ "contact":"3", "number":"0502030717", "name":"", "sexe":"0", "age":"15", "studies":"3", "reltype":"inconnu", "dist":"5+" },
{ "contact":"4", "number":"0502030873", "name":"", "sexe":"0", "age":"20", "studies":"4", "reltype":"inconnu", "dist":"5+" },
{ "contact":"5", "number":"0502031029", "name":"", "sexe":"0", "age":"25", "studies":"5", "reltype":"inconnu", "dist":"5" },
{ "contact":"6", "number":"0502031185", "name":"", "sexe":"0", "age":"30", "studies":"6", "reltype":"inconnu", "dist":"15" },
{ "contact":"7", "number":"0502031341", "name":"", "sexe":"0", "age":"35", "studies":"7", "reltype":"inconnu", "dist":"15" },
{ "contact":"8", "number":"0502031497", "name":"", "sexe":"0", "age":"40", "studies":"8", "reltype":"inconnu", "dist":"15" },
{ "contact":"9", "number":"0502031653", "name":"", "sexe":"0", "age":"45", "studies":"9", "reltype":"inconnu", "dist":"5" },
{ "contact":"10", "number":"0502031809", "name":"", "sexe":"0", "age":"50", "studies":"10", "reltype":"inconnu", "dist":"5" },
{ "contact":"11", "number":"0502031965", "name":"", "sexe":"0", "age":"55", "studies":"11", "reltype":"inconnu", "dist":"15+" },
{ "contact":"12", "number":"0502032121", "name":"", "sexe":"0", "age":"60", "studies":"12", "reltype":"inconnu", "dist":"15+" },
{ "contact":"13", "number":"0502032277", "name":"", "sexe":"0", "age":"65", "studies":"13", "reltype":"inconnu", "dist":"15+" },
{ "contact":"14", "number":"0502032433", "name":"", "sexe":"0", "age":"70", "studies":"14", "reltype":"inconnu", "dist":"60+" },
{ "contact":"15", "number":"0502032589", "name":"", "sexe":"0", "age":"75", "studies":"15", "reltype":"inconnu", "dist":"60+" },
{ "contact":"16", "number":"0502032745", "name":"", "sexe":"0", "age":"80", "studies":"16", "reltype":"inconnu", "dist":"60+" },
{ "contact":"17", "number":"0502032901", "name":"", "sexe":"0", "age":"85", "studies":"17", "reltype":"inconnu", "dist":"60+" },
{ "contact":"18", "number":"0502033057", "name":"", "sexe":"0", "age":"90", "studies":"18", "reltype":"inconnu", "dist":"60+" },
{ "contact":"19", "number":"0502033213", "name":"", "sexe":"0", "age":"95", "studies":"19", "reltype":"inconnu", "dist":"5" },
{ "contact":"20", "number":"0502033369", "name":"", "sexe":"0", "age":"100", "studies":"20", "reltype":"inconnu", "dist":"5" },
{ "contact":"21", "number":"0502033525", "name":"", "sexe":"0", "age":"105", "studies":"21", "reltype":"inconnu", "dist":"5" },
{ "contact":"22", "number":"0502033681", "name":"", "sexe":"0", "age":"110", "studies":"22", "reltype":"inconnu", "dist":"5" }
{ "contact":"1", "number":"0502030405", "name":"", "sexe":"0", "age":"1", "studies":"1", "reltype":"1", "dist":"0" },
{ "contact":"2", "number":"0502030561", "name":"", "sexe":"0", "age":"2", "studies":"2", "reltype":"2", "dist":"1" },
{ "contact":"3", "number":"0502030717", "name":"", "sexe":"0", "age":"3", "studies":"3", "reltype":"3", "dist":"2" },
{ "contact":"4", "number":"0502030873", "name":"", "sexe":"0", "age":"4", "studies":"4", "reltype":"4", "dist":"3" },
{ "contact":"5", "number":"0502031029", "name":"", "sexe":"0", "age":"5", "studies":"5", "reltype":"5", "dist":"4" },
{ "contact":"6", "number":"0502031185", "name":"", "sexe":"0", "age":"6", "studies":"6", "reltype":"6", "dist":"5" },
{ "contact":"7", "number":"0502031341", "name":"", "sexe":"0", "age":"7", "studies":"7", "reltype":"7", "dist":"6" },
{ "contact":"8", "number":"0502031497", "name":"", "sexe":"0", "age":"8", "studies":"8", "reltype":"8", "dist":"7" },
{ "contact":"9", "number":"0502031653", "name":"", "sexe":"0", "age":"9", "studies":"9", "reltype":"9", "dist":"8" },
{ "contact":"10", "number":"0502031809", "name":"", "sexe":"0", "age":"10", "studies":"10", "reltype":"10", "dist":"9" },
{ "contact":"11", "number":"0502031965", "name":"", "sexe":"0", "age":"11", "studies":"11", "reltype":"11", "dist":"10" },
{ "contact":"12", "number":"0502032121", "name":"", "sexe":"0", "age":"12", "studies":"12", "reltype":"12", "dist":"11" },
{ "contact":"13", "number":"0502032277", "name":"", "sexe":"0", "age":"13", "studies":"13", "reltype":"13", "dist":"12" },
{ "contact":"14", "number":"0502032433", "name":"", "sexe":"0", "age":"14", "studies":"14", "reltype":"14", "dist":"13" },
{ "contact":"15", "number":"0502032589", "name":"", "sexe":"0", "age":"15", "studies":"15", "reltype":"15", "dist":"14" },
{ "contact":"16", "number":"0502032745", "name":"", "sexe":"0", "age":"16", "studies":"16", "reltype":"16", "dist":"15" },
{ "contact":"17", "number":"0502032901", "name":"", "sexe":"0", "age":"17", "studies":"17", "reltype":"17", "dist":"16" },
{ "contact":"18", "number":"0502033057", "name":"", "sexe":"0", "age":"18", "studies":"18", "reltype":"18", "dist":"17" },
{ "contact":"19", "number":"0502033213", "name":"", "sexe":"0", "age":"19", "studies":"19", "reltype":"19", "dist":"18" },
{ "contact":"20", "number":"0502033369", "name":"", "sexe":"0", "age":"20", "studies":"20", "reltype":"20", "dist":"19" },
{ "contact":"21", "number":"0502033525", "name":"", "sexe":"0", "age":"21", "studies":"21", "reltype":"21", "dist":"20" },
{ "contact":"22", "number":"0502033681", "name":"", "sexe":"0", "age":"22", "studies":"22", "reltype":"22", "dist":"21" }
]

47
doc/phone_log_dict.json Normal file
View File

@ -0,0 +1,47 @@
{
"call_log": {
"direction": { "0": "INCOMING", "1": "OUTCOMING", "2": "MISSED" },
"type": { "0": "PHONE", "1": "SMS" }
},
"contacts": {
"sexe": { "0":"Homme", "1":"Femme" },
"age": {
"0": "5 à 10", "1": "10 à 15", "2": "15 à 20", "3": "20 à 25", "4": "25 à 30",
"5": "30 à 35", "6": "35 à 40", "7": "40 à 45", "8": "45 à 50", "9": "50 à 55",
"10": "55 à 60", "11": "60 à 65", "12": "65 à 70", "13": "70 à 75", "14": "75 à 80",
"15": "80 à 85", "16": "85 à 90", "17": "90 à 95", "18": "95 à 100"
},
"studies": {
},
"reltype": {
"0": "Père, mère ou équivalent",
"1": "Frère ou soeur",
"2": "Autre membre de la famille",
"3": "Relation amoureuse",
"4": "Collègue",
"5": "Voisin",
"6": "Ami",
"7": "Ami proche",
"8": "Relation de service (médecin, ...)",
"9": "Inconnu"
},
"dist": {
"0": "- de 5 minutes",
"1": "de 5 à 15 minutes",
"2": "de 15 à 60 minutes",
"3": "+ d'une heure"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -137,9 +137,10 @@ miniFicheBuilder.setLayout(
"\t</h5>\n"+
"\t<h4 data-icon='m'>Où habite t-elle/il ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tOù habite t-elle/il ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_min_@uid' data-name='loc' id='locA_min_@uid' value='0'><label for='locA_min_@uid'>de 5 minutes</label><br>\n"+
"\t\tÀ combien de temps est-ce de chez vous ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_min_@uid' data-name='loc' id='locA_min_@uid' value='0'><label for='locA_min_@uid'>- de 5 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_min_@uid' data-name='loc' id='locB_min_@uid' value='1'><label for='locB_min_@uid'>de 5 à 15 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_min_@uid' data-name='loc' id='locC_min_@uid' value='2'><label for='locC_min_@uid'>de 15 à 60 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_min_@uid' data-name='loc' id='locD_min_@uid' value='3'><label for='locD_min_@uid'>+ d'une heure</label><br>\n"+
@ -342,8 +343,8 @@ ficheBuilder.setLayout(
"\t<h5 class='nobold color0'>\n"+
"\t\tOù habite t-elle/il ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_@uid' data-name='loc' id='locA_@uid' value='0'><label for='locA_@uid'>de 5 minutes</label><br>\n"+
"\t\tÀ combien de temps est-ce de chez vous ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_@uid' data-name='loc' id='locA_@uid' value='0'><label for='locA_@uid'>- de 5 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_@uid' data-name='loc' id='locB_@uid' value='1'><label for='locB_@uid'>de 5 à 15 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_@uid' data-name='loc' id='locC_@uid' value='2'><label for='locC_@uid'>de 15 à 60 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_@uid' data-name='loc' id='locD_@uid' value='3'><label for='locD_@uid'>+ d'une heure</label><br>\n"+

View File

@ -74,7 +74,6 @@
/* (2) On enregistre le contact dans l'annuaire s'il y est pas déjà */
if( !isset($phone_directory[$number]) )
$phone_directory[$number] = array(
'name' => strlen($log['Name']) ? (string) $log['Name'] : null,
'calls' => 0,
'sms' => 0