Кто как справляется с этой проблемой?
const config = [
'region', 'district', 'area', 'city',
{id:'place_id', name:'cityName'}, {id:'name', name:'streetName'},
];
clearAllControl() {
config.forEach(x=>{
let id = x.id || (x + '_id');
let name = x.name || (x + 'Name');
if (this.tableParam[id]) {
delete this.tableParam[id];
this.searchForm.get(name).patchValue(null);
}
});
this.generateAddressesTable(this.tableParam);
}
[
{ del: 'region_id', search: 'regionName' },
{ del: 'district_id', search: 'districtName' },
{ del: 'area_id', search: 'areaName' },
{ del: 'city_id', search: 'cityName' },
{ del: 'place_id', search: 'cityName' },
{ del: 'name', search: 'streetName' },
].forEach(n => {
if (this.tableParam[n.del]) {
delete this.tableParam[n.del];
this.searchForm.get(n.search).patchValue(null);
}
});
$users = [
'u101',
'u402',
'u503',
'u703',
'u114',
'u148',
'u152',
'u173',
'u134'
];
$string = implode(" OR ", $users); // u101 OR u402 OR u503 OR u703 OR u114 OR u148 OR u152 OR u173 OR u134;
"... WHERE `akk` IN (" . implode(",", $users) . ");";