Compare commits
No commits in common. "master" and "339-cmb-mobile-phone-validation-check" have entirely different histories.
master
...
339-cmb-mo
55
.env.dist
|
|
@ -15,7 +15,7 @@ APP_SECRET=b344cd6cd151ae1d61403ed55806c5ce
|
|||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
||||
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
|
||||
###< doctrine/doctrine-bundle ###
|
||||
GMAPS_API_KEY=insert_gmapsapikey_here
|
||||
GMAPS_API_KEY=insertgmapsapikeyhere
|
||||
|
||||
# rising tide sms gateway
|
||||
RT_USER=rt_user
|
||||
|
|
@ -28,7 +28,7 @@ RT_SHORTCODE=1234
|
|||
MQTT_IP_ADDRESS=localhost
|
||||
MQTT_PORT=8883
|
||||
MQTT_CERT=/location/of/cert/file.crt
|
||||
MQTT_WS_HOST=insert_ip_here
|
||||
MQTT_WS_HOST=insertiphere
|
||||
MQTT_WS_PORT=8083
|
||||
|
||||
# redis client
|
||||
|
|
@ -38,55 +38,20 @@ REDIS_CLIENT_PORT=6379
|
|||
REDIS_CLIENT_PASSWORD=foobared
|
||||
|
||||
# privacy policy ids
|
||||
POLICY_PROMO=insert_promopolicyid_here
|
||||
POLICY_THIRD_PARTY=insert_thirdpartypolicyid_here
|
||||
POLICY_MOBILE=insert_mobilepolicyid_here
|
||||
POLICY_PROMO=insertpromopolicyidhere
|
||||
POLICY_THIRD_PARTY=insertthirdpartypolicyidhere
|
||||
POLICY_MOBILE=insertmobilepolicyidhere
|
||||
|
||||
# OTP
|
||||
OTP_MODE=set_to_test_or_random
|
||||
OTP_MODE=settotestorrandom
|
||||
|
||||
# geofence
|
||||
GEOFENCE_ENABLE=set_to_true_or_false
|
||||
GEOFENCE_ENABLE=settotrueorfalse
|
||||
|
||||
# unknown manufacturer and vehicle ids
|
||||
CVU_MFG_ID=insert_mfgid_for_unknown_vehicles
|
||||
CVU_BRAND_ID=insert_brandid_for_unknown_vehicles
|
||||
CVU_MFG_ID=insertmfgidforunknownvehicles
|
||||
CVU_BRAND_ID=insertbrandidforunknownvehicles
|
||||
|
||||
# country code prefix
|
||||
COUNTRY_CODE=+insert_country_code_here
|
||||
COUNTRY_CODE=+insertcountrycodehere
|
||||
|
||||
# redis hash
|
||||
LATEST_ACTIVE_JO=latest_active_jo
|
||||
|
||||
# dashboard
|
||||
DASHBOARD_ENABLE=set_to_true_or_false
|
||||
|
||||
# auth token for Inventory API
|
||||
INVENTORY_API_URL=insert_api_url_here
|
||||
INVENTORY_API_OCP=insert_ocp_text_here
|
||||
INVENTORY_API_AUTH_TOKEN_PREFIX=Bearer
|
||||
INVENTORY_API_AUTH_TOKEN=insert_auth_token_here
|
||||
|
||||
# API logging
|
||||
API_LOGGING=set_to_true_or_false
|
||||
|
||||
# customer distance limit in km for mobile
|
||||
CUST_DISTANCE_LIMIT=5
|
||||
|
||||
# customer distance limit in km for admin panel
|
||||
CUST_DISTANCE_LIMIT_ADMIN_PANEL=5
|
||||
|
||||
MAPTILER_API_KEY=map_tiler_api_key
|
||||
|
||||
# API version
|
||||
API_VERSION=insert_api_version_here
|
||||
|
||||
#SSL_ENABLE for websockets
|
||||
SSL_ENABLE=set_to_true_or_false
|
||||
|
||||
# for hub filtering round robin
|
||||
HUB_JO_KEY=hub_jo_count
|
||||
|
||||
# hub geofence
|
||||
HUB_GEOFENCE_ENABLE=set_to_true_or_false
|
||||
HUB_FILTER_ENABLE=set_to_true_or_false
|
||||
|
|
|
|||
4
.gitignore
vendored
|
|
@ -11,7 +11,3 @@
|
|||
###< symfony/framework-bundle ###
|
||||
|
||||
*.swp
|
||||
/public/warranty_uploads/*
|
||||
.vscode
|
||||
*__pycache__
|
||||
/public/assets/images/insurance-premiums.png
|
||||
9
catalyst/api-bundle/Access/Generator.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Access;
|
||||
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as BaseGenerator;
|
||||
|
||||
class Generator extends BaseGenerator
|
||||
{
|
||||
}
|
||||
10
catalyst/api-bundle/Access/Voter.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Access;
|
||||
|
||||
use Catalyst\AuthBundle\Service\ACLVoter as BaseVoter;
|
||||
|
||||
class Voter extends BaseVoter
|
||||
{
|
||||
}
|
||||
|
||||
9
catalyst/api-bundle/CatalystAPIBundle.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class CatalystAPIBundle extends Bundle
|
||||
{
|
||||
}
|
||||
142
catalyst/api-bundle/Command/TestAPICommand.php
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
|
||||
use Catalyst\APIBundle\Connector\Client as APIClient;
|
||||
|
||||
|
||||
class TestAPICommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:test-connector-all')
|
||||
->setDescription('Test API connector with all commands.')
|
||||
->setHelp('Test API Connector with all commands.')
|
||||
->addArgument('protocol', InputArgument::REQUIRED, 'protocol')
|
||||
->addArgument('server', InputArgument::REQUIRED, 'server')
|
||||
->addArgument('api_key', InputArgument::REQUIRED, 'api_key')
|
||||
->addArgument('secret_key', InputArgument::REQUIRED, 'secret_key');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$protocol = $input->getArgument('protocol');
|
||||
$server = $input->getArgument('server');
|
||||
$api_key = $input->getArgument('api_key');
|
||||
$secret_key = $input->getArgument('secret_key');
|
||||
|
||||
// api client
|
||||
$api = new APIClient($server, $api_key, $secret_key);
|
||||
$api->setProtocol($protocol);
|
||||
|
||||
// test
|
||||
$api->get('/capi/test');
|
||||
|
||||
// TODO: shift this out of the bundle, since it's project specific
|
||||
|
||||
// warranty register
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$plate_num = 'XEN918';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '09231234567',
|
||||
];
|
||||
//$api->post('/capi/warranties', $params);
|
||||
|
||||
// get all warranties
|
||||
$params = [
|
||||
'order' => 'DESC',
|
||||
'limit' => '5',
|
||||
'start' => '1',
|
||||
];
|
||||
|
||||
$api->get('/capi/warranties', $params);
|
||||
|
||||
|
||||
// warranty find
|
||||
//$api->get('/capi/warranties/' . $serial);
|
||||
|
||||
// warranty update
|
||||
$id = 86811;
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '123456789111',
|
||||
];
|
||||
//$api->post('/capi/warranties/'. $id, $params);
|
||||
|
||||
// warranty set privacy policy
|
||||
$id = 86811;
|
||||
$policy_id = 2;
|
||||
$params = [
|
||||
'privacy_policy_id' => $policy_id,
|
||||
];
|
||||
//$api->post('/capi/warranties/' . $id .'/privacypolicy', $params);
|
||||
|
||||
// warranty claim
|
||||
$id = 86811;
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
];
|
||||
//$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
|
||||
// warranty cancel
|
||||
$id = 86811;
|
||||
//$api->get('/capi/warranties/' . $id . '/cancel');
|
||||
|
||||
// plate warranty
|
||||
//$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
|
||||
// warranty delete
|
||||
$id = 86811;
|
||||
//$api->post('/capi/warranties/' . $id . '/delete');
|
||||
|
||||
// battery
|
||||
//$api->get('/capi/battery_brands');
|
||||
//$api->get('/capi/battery_sizes');
|
||||
//$api->get('/capi/batteries');
|
||||
|
||||
// vehicle
|
||||
//$api->get('/capi/vehicle_manufacturers');
|
||||
//$api->get('/capi/vehicles');
|
||||
|
||||
// privacy policy
|
||||
$privacy_policy_id = 2;
|
||||
$api->get('/capi/privacy_policy/' . $privacy_policy_id );
|
||||
|
||||
// register new customer
|
||||
$params = [
|
||||
'first_name' => 'Krispups',
|
||||
'last_name' =>'Porzindog',
|
||||
'mobile_number' => '9221111111',
|
||||
'v_make_id' => '22241',
|
||||
'v_model_year' => '2018',
|
||||
'v_plate_number' => 'KPP1234',
|
||||
'v_color' => 'White',
|
||||
'v_condition' => 'new',
|
||||
'v_fuel_type' => 'gas',
|
||||
];
|
||||
$api->post('/capi/quick_registration', $params);
|
||||
}
|
||||
}
|
||||
104
catalyst/api-bundle/Command/TestCommand.php
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
|
||||
use Catalyst\APIBundle\Connector\Client as APIClient;
|
||||
|
||||
|
||||
class TestCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:test-connector')
|
||||
->setDescription('Test API connector.')
|
||||
->setHelp('Test API Connector.')
|
||||
->addArgument('protocol', InputArgument::REQUIRED, 'protocol')
|
||||
->addArgument('server', InputArgument::REQUIRED, 'server')
|
||||
->addArgument('api_key', InputArgument::REQUIRED, 'api_key')
|
||||
->addArgument('secret_key', InputArgument::REQUIRED, 'secret_key');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$protocol = $input->getArgument('protocol');
|
||||
$server = $input->getArgument('server');
|
||||
$api_key = $input->getArgument('api_key');
|
||||
$secret_key = $input->getArgument('secret_key');
|
||||
|
||||
// api client
|
||||
$api = new APIClient($server, $api_key, $secret_key);
|
||||
$api->setProtocol($protocol);
|
||||
|
||||
// test
|
||||
$api->get('/capi/test');
|
||||
|
||||
// TODO: shift this out of the bundle, since it's project specific
|
||||
|
||||
|
||||
// warranty register
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$plate_num = 'XEN918';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '12345678910',
|
||||
];
|
||||
$api->post('/capi/warranties', $params);
|
||||
|
||||
// get all warranties
|
||||
$api->get('/capi/warranties');
|
||||
|
||||
|
||||
/*
|
||||
// warranty find
|
||||
$api->get('/capi/warranties/' . $serial);
|
||||
*/
|
||||
|
||||
// warranty claim
|
||||
$id = 86811;
|
||||
$serial = 'AJ34LJADR12134LKJL';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
];
|
||||
$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
|
||||
// add battery
|
||||
$sku = 'WZMB31QT-CPP00-S';
|
||||
$brand_id = '4';
|
||||
$size_id = '1';
|
||||
$params = [
|
||||
'sku' => $sku,
|
||||
'brand_id' => $brand_id,
|
||||
'size_id' => $size_id,
|
||||
];
|
||||
$api->post('/capi/batteries', $params);
|
||||
|
||||
/*
|
||||
|
||||
// plate warranty
|
||||
$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
|
||||
// battery
|
||||
$api->get('/capi/battery_brands');
|
||||
$api->get('/capi/battery_sizes');
|
||||
$api->get('/capi/batteries');
|
||||
|
||||
// vehicle
|
||||
// $api->get('/capi/vehicle_manufacturers');
|
||||
// $api->get('/capi/vehicles');
|
||||
*/
|
||||
}
|
||||
}
|
||||
49
catalyst/api-bundle/Command/UserCreateCommand.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User;
|
||||
|
||||
class UserCreateCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:user-create')
|
||||
->setDescription('Create new API user.')
|
||||
->setHelp('Creates new API user and saves to database.')
|
||||
->addArgument('name', InputArgument::REQUIRED, 'name');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$name = $input->getArgument('name');
|
||||
|
||||
$user = new User();
|
||||
$user->setName($name);
|
||||
|
||||
$this->em->persist($user);
|
||||
$this->em->flush();
|
||||
|
||||
$output->write('API Key - ' . $user->getAPIKey() . "\n");
|
||||
$output->write('Secret Key - ' . $user->getSecretKey() . "\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
151
catalyst/api-bundle/Connector/Client.php
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Connector;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class Client
|
||||
{
|
||||
const HEADER_API_KEY = 'X-Cata-API-Key';
|
||||
const HEADER_SIGNATURE = 'X-Cata-Signature';
|
||||
const HEADER_DATE = 'X-Cata-Date';
|
||||
|
||||
const DATE_FORMAT = 'D, d M Y H:i:s T';
|
||||
|
||||
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36';
|
||||
|
||||
protected $protocol;
|
||||
protected $server;
|
||||
protected $port;
|
||||
protected $api_key;
|
||||
protected $secret_key;
|
||||
|
||||
protected $curl;
|
||||
|
||||
public function __construct($server, $api_key, $secret_key)
|
||||
{
|
||||
$this->protocol = 'https';
|
||||
$this->port = null;
|
||||
|
||||
$this->server = $server;
|
||||
$this->api_key = $api_key;
|
||||
$this->secret_key = $secret_key;
|
||||
$this->curl = curl_init();
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
curl_close($this->curl);
|
||||
}
|
||||
|
||||
public function setProtocol($protocol)
|
||||
{
|
||||
if ($protocol != 'http' && $protocol != 'https')
|
||||
return $this;
|
||||
|
||||
$this->protocol = $protocol;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getDateString()
|
||||
{
|
||||
$date = new DateTime();
|
||||
return $date->format(self::DATE_FORMAT);
|
||||
}
|
||||
|
||||
public function get($url, $params = [])
|
||||
{
|
||||
curl_reset($this->curl);
|
||||
|
||||
$date_string = $this->getDateString();
|
||||
$headers = $this->generateHeaders('GET', $url, $date_string);
|
||||
|
||||
// build query string
|
||||
if (count($params) > 0)
|
||||
$query_string = '?' . http_build_query($params);
|
||||
else
|
||||
$query_string = '';
|
||||
|
||||
// build url
|
||||
if ($this->port == null)
|
||||
$full_url = $this->protocol . '://' . $this->server . $url . $query_string;
|
||||
else
|
||||
$full_url = $this->protocol . '://' . $this->server . ':' . $this->port . $url . $query_string;
|
||||
|
||||
error_log($full_url);
|
||||
|
||||
// curl
|
||||
// curl_setopt($this->curl, CURLOPT_VERBOSE, true);
|
||||
curl_setopt($this->curl, CURLOPT_URL, $full_url);
|
||||
curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($this->curl, CURLOPT_USERAGENT, self::USER_AGENT);
|
||||
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($this->curl, CURLOPT_TIMEOUT, 0);
|
||||
|
||||
$res = curl_exec($this->curl);
|
||||
error_log($res);
|
||||
}
|
||||
|
||||
public function post($url, $params = [])
|
||||
{
|
||||
curl_reset($this->curl);
|
||||
|
||||
$date_string = $this->getDateString();
|
||||
$headers = $this->generateHeaders('POST', $url, $date_string);
|
||||
|
||||
// build query string
|
||||
$query_string = http_build_query($params);
|
||||
|
||||
// build url
|
||||
if ($this->port == null)
|
||||
$full_url = $this->protocol . '://' . $this->server . $url;
|
||||
else
|
||||
$full_url = $this->protocol . '://' . $this->server . ':' . $this->port . $url;
|
||||
|
||||
error_log($full_url);
|
||||
|
||||
// curl
|
||||
// curl_setopt($this->curl, CURLOPT_VERBOSE, true);
|
||||
curl_setopt($this->curl, CURLOPT_URL, $full_url);
|
||||
curl_setopt($this->curl, CURLOPT_POST, true);
|
||||
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $query_string);
|
||||
curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($this->curl, CURLOPT_USERAGENT, self::USER_AGENT);
|
||||
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($this->curl, CURLOPT_TIMEOUT, 0);
|
||||
|
||||
$res = curl_exec($this->curl);
|
||||
error_log($res);
|
||||
}
|
||||
|
||||
protected function generateSignature($method, $url, $date_string)
|
||||
{
|
||||
$creds = [
|
||||
$method,
|
||||
$url,
|
||||
$date_string,
|
||||
$this->secret_key,
|
||||
];
|
||||
$sig_source = implode('|', $creds);
|
||||
|
||||
error_log('SIG SOURCE - ' . $sig_source);
|
||||
|
||||
$raw_sig = hash_hmac('sha1', $sig_source, $this->secret_key, true);
|
||||
$enc_sig = base64_encode($raw_sig);
|
||||
|
||||
return $enc_sig;
|
||||
}
|
||||
|
||||
protected function generateHeaders($method, $url, $date_string)
|
||||
{
|
||||
$sig = $this->generateSignature($method, $url, $date_string);
|
||||
|
||||
$headers = [
|
||||
self::HEADER_API_KEY . ': ' . $this->api_key,
|
||||
self::HEADER_SIGNATURE . ': ' . $sig,
|
||||
self::HEADER_DATE . ': ' . $date_string,
|
||||
];
|
||||
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
42
catalyst/api-bundle/Controller/APIController.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
abstract class APIController extends Controller
|
||||
{
|
||||
protected function checkRequiredParameters(Request $req, $params = [])
|
||||
{
|
||||
$missing = [];
|
||||
|
||||
// check if parameters are there
|
||||
foreach ($params as $param)
|
||||
{
|
||||
if ($req->getMethod() == 'GET')
|
||||
{
|
||||
$check = $req->query->get($param);
|
||||
if (empty($check))
|
||||
$missing[] = $param;
|
||||
}
|
||||
// else if ($req->getMethod() == 'POST')
|
||||
else
|
||||
{
|
||||
$check = $req->request->get($param);
|
||||
//if (empty($check))
|
||||
if (!isset($check))
|
||||
$missing[] = $param;
|
||||
}
|
||||
}
|
||||
|
||||
// check missing parameters
|
||||
if (count($missing) > 0)
|
||||
{
|
||||
$miss_string = implode(', ', $missing);
|
||||
return 'Missing required parameter(s): ' . $miss_string;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
20
catalyst/api-bundle/DataFixtures/APIRoleFixtures.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\DataFixtures;
|
||||
|
||||
use Catalyst\APIBundle\Entity\Role;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
|
||||
class APIRoleFixtures extends Fixture
|
||||
{
|
||||
public function load(ObjectManager $em)
|
||||
{
|
||||
// setup super user account
|
||||
$role = new Role();
|
||||
$role->setID(Role::SUPER_ADMIN)
|
||||
->setName('Super Administrator');
|
||||
$em->persist($role);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
28
catalyst/api-bundle/Entity/Role.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Entity;
|
||||
|
||||
use Catalyst\AuthBundle\Entity\Role as BaseRole;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="api_role")
|
||||
* @UniqueEntity("id")
|
||||
* @UniqueEntity("name")
|
||||
*/
|
||||
class Role extends BaseRole
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="User", mappedBy="roles", fetch="EXTRA_LAZY")
|
||||
*/
|
||||
protected $users;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
148
catalyst/api-bundle/Entity/User.php
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Entity;
|
||||
|
||||
use Catalyst\AuthBundle\Entity\User as BaseUser;
|
||||
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\JoinColumn;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="api_user")
|
||||
*/
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
// api key
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
*/
|
||||
protected $api_key;
|
||||
|
||||
// secret key
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
*/
|
||||
protected $secret_key;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=80)
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
// date created
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
protected $date_create;
|
||||
|
||||
// roles
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Role", inversedBy="users")
|
||||
* @ORM\JoinTable(name="api_user_role")
|
||||
*/
|
||||
protected $roles;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// generate keys
|
||||
$this->setAPIKey($this->generateAPIKey())
|
||||
->setSecretKey($this->generateSecretKey());
|
||||
|
||||
// set date created
|
||||
$this->date_create = new DateTime();
|
||||
}
|
||||
|
||||
public function getID()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setAPIKey($api_key)
|
||||
{
|
||||
$this->api_key = $api_key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAPIKey()
|
||||
{
|
||||
return $this->api_key;
|
||||
}
|
||||
|
||||
public function setSecretKey($key)
|
||||
{
|
||||
$this->secret_key = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSecretKey()
|
||||
{
|
||||
return $this->secret_key;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getDateCreate()
|
||||
{
|
||||
return $this->date_create;
|
||||
}
|
||||
|
||||
public function getPassword()
|
||||
{
|
||||
// we don't need this for API
|
||||
return 'notneeded';
|
||||
}
|
||||
|
||||
public function getSalt()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getUsername()
|
||||
{
|
||||
// since it's an api, the api key IS the username
|
||||
return $this->api_key;
|
||||
}
|
||||
|
||||
public function eraseCredentials()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public function generateAPIKey()
|
||||
{
|
||||
return $this->generateKey('api');
|
||||
}
|
||||
|
||||
public function generateSecretKey()
|
||||
{
|
||||
return $this->generateKey('secret');
|
||||
}
|
||||
|
||||
protected function generateKey($prefix = '')
|
||||
{
|
||||
return md5(uniqid($prefix, true));
|
||||
}
|
||||
}
|
||||
|
||||
20
catalyst/api-bundle/Response/APIResponse.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Response;
|
||||
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class APIResponse extends JsonResponse
|
||||
{
|
||||
public function __construct($success = true, $message = '', $data = null, $status = 200, $headers = [])
|
||||
{
|
||||
$data = [
|
||||
'success' => (bool) $success,
|
||||
'message' => (string) $message,
|
||||
'data' => $data,
|
||||
];
|
||||
parent::__construct($data, $status, $headers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
160
catalyst/api-bundle/Security/APIKeyAuthenticator.php
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Security;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
|
||||
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class APIKeyAuthenticator implements SimplePreAuthenticatorInterface, AuthenticationFailureHandlerInterface
|
||||
{
|
||||
const HEADER_API_KEY = 'X-Cata-API-Key';
|
||||
const HEADER_SIGNATURE = 'X-Cata-Signature';
|
||||
const HEADER_DATE = 'X-Cata-Date';
|
||||
|
||||
const DATE_FORMAT = 'D, d M Y H:i:s T';
|
||||
|
||||
// 30 minute time limit
|
||||
const TIME_LIMIT = 1800;
|
||||
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
protected function validateSignature($creds, $secret_key)
|
||||
{
|
||||
$elements = [
|
||||
$creds['method'],
|
||||
$creds['uri'],
|
||||
$creds['date'],
|
||||
$secret_key,
|
||||
];
|
||||
$sig_source = implode('|', $elements);
|
||||
|
||||
error_log($sig_source);
|
||||
|
||||
// generate signature
|
||||
$raw_sig = hash_hmac('sha1', $sig_source, $secret_key, true);
|
||||
$enc_sig = base64_encode($raw_sig);
|
||||
|
||||
error_log($enc_sig);
|
||||
|
||||
if ($enc_sig != trim($creds['signature']))
|
||||
throw new CustomUserMessageAuthenticationException('Invalid signature.');
|
||||
|
||||
}
|
||||
|
||||
public function createToken(Request $req, $provider_key)
|
||||
{
|
||||
// api key header
|
||||
$api_key = $req->headers->get(self::HEADER_API_KEY);
|
||||
if ($api_key == null)
|
||||
throw new BadCredentialsException('No API key sent.');
|
||||
|
||||
// check date from headers
|
||||
$hdate_string = $req->headers->get(self::HEADER_DATE);
|
||||
if ($hdate_string == null)
|
||||
throw new BadCredentialsException('No date specified.');
|
||||
|
||||
$hdate = DateTime::createFromFormat(self::DATE_FORMAT, $hdate_string);
|
||||
if ($hdate == null)
|
||||
throw new BadCredentialsException('Invalid date specified.');
|
||||
|
||||
// get number of seconds difference
|
||||
$date_now = new DateTime();
|
||||
$date_diff = abs($date_now->getTimestamp() - $hdate->getTimestamp());
|
||||
|
||||
// time difference is too much
|
||||
if ($date_diff > self::TIME_LIMIT)
|
||||
throw new BadCredentialsException('Clock synchronization error.');
|
||||
|
||||
// signature header
|
||||
$sig = $req->headers->get(self::HEADER_SIGNATURE);
|
||||
if ($sig == null)
|
||||
throw new BadCredentialsException('No signature sent.');
|
||||
|
||||
// credentials
|
||||
$creds = [
|
||||
'api_key' => $api_key,
|
||||
'date' => $hdate_string,
|
||||
'signature' => $sig,
|
||||
'method' => $req->getRealMethod(),
|
||||
'uri' => $req->getPathInfo(),
|
||||
];
|
||||
|
||||
return new PreAuthenticatedToken(
|
||||
'anonymous',
|
||||
$creds,
|
||||
$provider_key
|
||||
);
|
||||
}
|
||||
|
||||
public function supportsToken(TokenInterface $token, $provider_key)
|
||||
{
|
||||
return $token instanceof PreAuthenticatedToken && $token->getProviderKey() === $provider_key;
|
||||
}
|
||||
|
||||
public function authenticateToken(TokenInterface $token, UserProviderInterface $user_provider, $provider_key)
|
||||
{
|
||||
if (!$user_provider instanceof APIKeyUserProvider)
|
||||
{
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
'The user provider must be an instance of APIKeyUserProvider (%s was given).',
|
||||
get_class($user_provider)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$creds = $token->getCredentials();
|
||||
$api_key = $creds['api_key'];
|
||||
$user = $user_provider->getUserByAPIKey($api_key);
|
||||
|
||||
// check if api key is valid
|
||||
if (!$user)
|
||||
throw new CustomUserMessageAuthenticationException('Invalid API Key');
|
||||
|
||||
// check if signature is valid
|
||||
$this->validateSignature($creds, $user->getSecretKey());
|
||||
|
||||
// check if user is enabled
|
||||
if (!$user->isEnabled())
|
||||
{
|
||||
throw new CustomUserMessageAuthenticationException('User account is disabled');
|
||||
}
|
||||
|
||||
// $user = $user_provider->loadUserByUsername($username);
|
||||
|
||||
return new PreAuthenticatedToken(
|
||||
$user,
|
||||
$api_key,
|
||||
$provider_key,
|
||||
$user->getRoles()
|
||||
);
|
||||
}
|
||||
|
||||
public function onAuthenticationFailure(Request $req, AuthenticationException $exception)
|
||||
{
|
||||
$data = [
|
||||
'success' => false,
|
||||
'error' => [
|
||||
'message' => $exception->getMessage(),
|
||||
],
|
||||
];
|
||||
return new JsonResponse($data, 401);
|
||||
}
|
||||
}
|
||||
62
catalyst/api-bundle/Security/APIKeyUserProvider.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Security;
|
||||
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User;
|
||||
|
||||
class APIKeyUserProvider implements UserProviderInterface
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function getUserByAPIKey($api_key)
|
||||
{
|
||||
$user = $this->em->getRepository(User::class)->findOneBy(array('api_key' => $api_key));
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function getUsernameForAPIKey($apiKey)
|
||||
{
|
||||
// Look up the username based on the token in the database, via
|
||||
// an API call, or do something entirely different
|
||||
$username = 'test';
|
||||
|
||||
return $username;
|
||||
}
|
||||
|
||||
public function loadUserByUsername($username)
|
||||
{
|
||||
return new User(
|
||||
$username,
|
||||
null,
|
||||
// the roles for the user - you may choose to determine
|
||||
// these dynamically somehow based on the user
|
||||
array('ROLE_API')
|
||||
);
|
||||
}
|
||||
|
||||
public function refreshUser(UserInterface $user)
|
||||
{
|
||||
// this is used for storing authentication in the session
|
||||
// but in this example, the token is sent in each request,
|
||||
// so authentication can be stateless. Throwing this exception
|
||||
// is proper to make things stateless
|
||||
throw new UnsupportedUserException();
|
||||
}
|
||||
|
||||
public function supportsClass($class)
|
||||
{
|
||||
return User::class === $class;
|
||||
}
|
||||
}
|
||||
18
catalyst/api-bundle/Service/AccessDeniedHandler.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Service;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface;
|
||||
|
||||
class AccessDeniedHandler implements AccessDeniedHandlerInterface
|
||||
{
|
||||
public function handle(Request $req, AccessDeniedException $exception)
|
||||
{
|
||||
$content = $exception->getMessage();
|
||||
|
||||
return new Response($content, 403);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,44 +2,18 @@
|
|||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/jankstudio/doctrine2-spatial.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/api-bundle.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/auth-bundle.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/menu-bundle.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/arcticzero/php-fcm.git"
|
||||
}
|
||||
{ "type": "vcs", "url": "git@gitlab.com:jankstudio-catalyst/auth-bundle.git" },
|
||||
{ "type": "vcs", "url": "git@gitlab.com:jankstudio-catalyst/menu-bundle.git" }
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"ext-iconv": "*",
|
||||
"composer/package-versions-deprecated": "1.11.99.4",
|
||||
"catalyst/auth-bundle": "dev-master",
|
||||
"catalyst/menu-bundle": "dev-master",
|
||||
"creof/doctrine2-spatial": "^1.2",
|
||||
"data-dog/audit-bundle": "^0.1.10",
|
||||
"doctrine/common": "^2",
|
||||
"doctrine/doctrine-bundle": "^2",
|
||||
"doctrine/doctrine-migrations-bundle": "^2",
|
||||
"doctrine/orm": "^2",
|
||||
"edwinhoksberg/php-fcm": "dev-notif-priority-hotfix",
|
||||
"edwinhoksberg/php-fcm": "^1.0",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"hashids/hashids": "^4.1",
|
||||
"jankstudio/catalyst-api-bundle": "dev-master",
|
||||
"jankstudio/catalyst-auth-bundle": "dev-master",
|
||||
"jankstudio/catalyst-menu-bundle": "dev-master",
|
||||
"jankstudio/doctrine-spatial": "dev-master",
|
||||
"microsoft/azure-storage-blob": "^1.5",
|
||||
"predis/predis": "^1.1",
|
||||
"sensio/framework-extra-bundle": "^5.1",
|
||||
"setasign/fpdf": "^1.8",
|
||||
|
|
@ -50,8 +24,8 @@
|
|||
"symfony/flex": "^1.0",
|
||||
"symfony/framework-bundle": "^4.0",
|
||||
"symfony/maker-bundle": "^1.0",
|
||||
"symfony/monolog-bundle": "^3.7",
|
||||
"symfony/process": "^4.0",
|
||||
"symfony/orm-pack": "^1.0",
|
||||
"symfony/profiler-pack": "^1.0",
|
||||
"symfony/security-bundle": "^4.0",
|
||||
"symfony/translation": "^4.0",
|
||||
"symfony/twig-bundle": "^4.0",
|
||||
|
|
@ -61,24 +35,18 @@
|
|||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "^3.0",
|
||||
"symfony/dotenv": "^4.0",
|
||||
"symfony/stopwatch": "^4.0",
|
||||
"symfony/thanks": "^1.0",
|
||||
"symfony/web-profiler-bundle": "^4.0"
|
||||
"symfony/thanks": "^1.0"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"composer/package-versions-deprecated": true,
|
||||
"symfony/flex": true,
|
||||
"symfony/thanks": true
|
||||
}
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/"
|
||||
"App\\": "src/",
|
||||
"Catalyst\\APIBundle\\": "catalyst/api-bundle/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
|
|
|||
5207
composer.lock
generated
214
config/acl.yaml
|
|
@ -156,8 +156,6 @@ access_keys:
|
|||
label: Update
|
||||
- id: customer.delete
|
||||
label: Delete
|
||||
- id: customer.dpa
|
||||
label: Display DPA
|
||||
|
||||
|
||||
- id: location
|
||||
|
|
@ -217,20 +215,6 @@ access_keys:
|
|||
- id: rider.delete
|
||||
label: Delete
|
||||
|
||||
- id: servicecharge
|
||||
label: Service Charge
|
||||
acls:
|
||||
- id: service_charge.menu
|
||||
label: Menu
|
||||
- id: service_charge.list
|
||||
label: List
|
||||
- id: service_charge.add
|
||||
label: Add
|
||||
- id: service_charge.update
|
||||
label: Update
|
||||
- id: service_charge.delete
|
||||
label: Delete
|
||||
|
||||
- id: joborder
|
||||
label: Job Order
|
||||
acls:
|
||||
|
|
@ -262,18 +246,6 @@ access_keys:
|
|||
label: One-step Process
|
||||
- id: jo_onestep.edit
|
||||
label: One-step Process Edit
|
||||
- id: jo_walkin.form
|
||||
label: Walk-in
|
||||
- id: jo_walkin.edit
|
||||
label: Walk-in Edit
|
||||
- id: jo_autoassign.test
|
||||
label: Autoassign Test
|
||||
- id: jo_hub.list
|
||||
label: Hub View
|
||||
- id: jo_cancel.fulfill
|
||||
label: Fulfill Cancelled JO
|
||||
- id: jo_resq_proc.list
|
||||
label: RESQ Dispatch
|
||||
|
||||
- id: support
|
||||
label: Customer Support Access
|
||||
|
|
@ -334,24 +306,6 @@ access_keys:
|
|||
label: Vehicle Battery Compatibility Report
|
||||
- id: report.warranty.details
|
||||
label: Warranty Details Report
|
||||
- id: report.jo.details
|
||||
label: Job Order Details Report
|
||||
- id: report.jo_events
|
||||
label: Job Order Events Report
|
||||
- id: report.sms_messages
|
||||
label: SMS Messages Report
|
||||
- id: report.jo.auto_assign
|
||||
label: Auto Assigned Job Order Report
|
||||
- id: report.jo.advance_order
|
||||
label: Advance Order Job Order Report
|
||||
- id: report.customer.source
|
||||
label: Customer Source Report
|
||||
- id: report.hub.filter
|
||||
label: Hub Filter Report
|
||||
- id: report.warranty.raffle
|
||||
label: Warranty Raffle Report
|
||||
- id: report.jo.raffle
|
||||
label: JO Raffle Report
|
||||
|
||||
- id: service
|
||||
label: Other Services
|
||||
|
|
@ -432,171 +386,3 @@ access_keys:
|
|||
label: Update
|
||||
- id: static_content.delete
|
||||
label: Delete
|
||||
|
||||
- id: analytics
|
||||
label: Analytics
|
||||
acls:
|
||||
- id: analytics.menu
|
||||
label: Menu
|
||||
- id: analytics.forecast
|
||||
label: Forecasting
|
||||
|
||||
- id: sap_battery
|
||||
label: SAP Battery Access
|
||||
acls:
|
||||
- id: sap_battery.menu
|
||||
label: Menu
|
||||
- id: sap_battery.list
|
||||
label: List
|
||||
- id: sap_battery.add
|
||||
label: Add
|
||||
- id: sap_battery.update
|
||||
label: Update
|
||||
- id: sap_battery.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_brand
|
||||
label: SAP Battery Brand Access
|
||||
acls:
|
||||
- id: sap_brand.menu
|
||||
label: Menu
|
||||
- id: sap_brand.list
|
||||
label: List
|
||||
- id: sap_brand.add
|
||||
label: Add
|
||||
- id: sap_brand.update
|
||||
label: Update
|
||||
- id: sap_brand.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_bsize
|
||||
label: SAP Battery Size Access
|
||||
acls:
|
||||
- id: sap_bsize.menu
|
||||
label: Menu
|
||||
- id: sap_bsize.list
|
||||
label: List
|
||||
- id: sap_bsize.add
|
||||
label: Add
|
||||
- id: sap_bsize.update
|
||||
label: Update
|
||||
- id: sap_bsize.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_csize
|
||||
label: SAP Battery Container Size Access
|
||||
acls:
|
||||
- id: sap_csize.menu
|
||||
label: Menu
|
||||
- id: sap_csize.list
|
||||
label: List
|
||||
- id: sap_csize.add
|
||||
label: Add
|
||||
- id: sap_csize.update
|
||||
label: Update
|
||||
- id: sap_csize.delete
|
||||
label: Delete
|
||||
|
||||
- id: customer_tag
|
||||
label: Customer Tags Access
|
||||
acls:
|
||||
- id: customer_tag.menu
|
||||
label: Menu
|
||||
- id: customer_tag.list
|
||||
label: List
|
||||
- id: customer_tag.add
|
||||
label: Add
|
||||
- id: customer_tag.update
|
||||
label: Update
|
||||
- id: customer_tag.delete
|
||||
label: Delete
|
||||
|
||||
- id: dealer
|
||||
label: Dealer Access
|
||||
acls:
|
||||
- id: dealer.menu
|
||||
label: Menu
|
||||
- id: dealer.list
|
||||
label: List
|
||||
- id: dealer.add
|
||||
label: Add
|
||||
- id: dealer.update
|
||||
label: Update
|
||||
- id: dealer.delete
|
||||
label: Delete
|
||||
|
||||
- id: database
|
||||
label: Database Access
|
||||
acls:
|
||||
- id: database.menu
|
||||
label: Menu
|
||||
|
||||
- id: ticket_type
|
||||
label: Ticket Type Access
|
||||
acls:
|
||||
- id: ticket_type.menu
|
||||
label: Menu
|
||||
- id: ticket_type.list
|
||||
label: List
|
||||
- id: ticket_type.add
|
||||
label: Add
|
||||
- id: ticket_type.update
|
||||
label: Update
|
||||
- id: ticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: subticket_type
|
||||
label: Sub Ticket Type Access
|
||||
acls:
|
||||
- id: subticket_type.menu
|
||||
label: Menu
|
||||
- id: subticket_type.list
|
||||
label: List
|
||||
- id: subticket_type.add
|
||||
label: Add
|
||||
- id: subticket_type.update
|
||||
label: Update
|
||||
- id: subticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: emergency_type
|
||||
label: Emergency Type Access
|
||||
acls:
|
||||
- id: emergency_type.menu
|
||||
label: Menu
|
||||
- id: emergency_type.list
|
||||
label: List
|
||||
- id: emergency_type.add
|
||||
label: Add
|
||||
- id: emergency_type.update
|
||||
label: Update
|
||||
- id: emergency_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: ownership_type
|
||||
label: Ownership Type Access
|
||||
acls:
|
||||
- id: ownership_type.menu
|
||||
label: Menu
|
||||
- id: ownership_type.list
|
||||
label: List
|
||||
- id: ownership_type.add
|
||||
label: Add
|
||||
- id: ownership_type.update
|
||||
label: Update
|
||||
- id: ownership_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: customer_location
|
||||
label: Customer Location Access
|
||||
acls:
|
||||
- id: cust_location.menu
|
||||
label: Menu
|
||||
- id: cust_location.list
|
||||
label: List
|
||||
- id: cust_location.add
|
||||
label: Add
|
||||
- id: cust_location.update
|
||||
label: Update
|
||||
- id: cust_location.delete
|
||||
label: Delete
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ access_keys:
|
|||
label: Delete
|
||||
- id: warranty.set.privacypolicy
|
||||
label: Set Privacy Policy
|
||||
- id: warranty.list.serial
|
||||
label: List by Serial
|
||||
- id: batterybrand
|
||||
label: Battery Brand Access
|
||||
acls:
|
||||
|
|
@ -57,68 +55,3 @@ access_keys:
|
|||
acls:
|
||||
- id: customer.register
|
||||
label: Register Customer
|
||||
- id: customer.verify
|
||||
label: Verify Customer
|
||||
- id: municipality
|
||||
label: Municipality
|
||||
acls:
|
||||
- id: municipality.list
|
||||
label: List
|
||||
- id: dealer
|
||||
label: Dealer
|
||||
acls:
|
||||
- id: dealer.list
|
||||
label: List
|
||||
- id: warrantyserial
|
||||
label: Warranty Serial
|
||||
acls:
|
||||
- id: warrantyserial.upload
|
||||
label: Upload
|
||||
|
||||
- id: tapi_vmanufacturer
|
||||
label: Third Party Vehicle Manufacturer Access
|
||||
acls:
|
||||
- id: tapi_vmanufacturer.list
|
||||
label: List Third Party Vehicle Manufacturers
|
||||
- id: tapi_vehicle
|
||||
label: Third Party Vehicle Make Access
|
||||
acls:
|
||||
- id: tapi_vehicle.list
|
||||
label: List Third Party Vehicles
|
||||
- id: tapi_promo
|
||||
label: Third Party Promo Access
|
||||
acls:
|
||||
- id: tapi_promo.list
|
||||
label: List Third Party Promos
|
||||
- id: tapi_battery
|
||||
label: Third Party Battery Access
|
||||
acls:
|
||||
- id: tapi_battery_compatible.list
|
||||
label: List Third Party Compatible Batteries
|
||||
- id: tapi_jo
|
||||
label: Third Party Job Order Access
|
||||
acls:
|
||||
- id: tapi_jo.request
|
||||
label: Third Party Request Job Order
|
||||
- id: tapi_jo.get.estimate
|
||||
label: Third Party Get Estimate
|
||||
- id: tapi_jo.get.ongoing
|
||||
label: Third Party Get Ongoing Job Order
|
||||
- id: tapi_jo.cancel
|
||||
label: Third Party Cancel Job Order
|
||||
- id: tapi_jo.get.invoice
|
||||
label: Third Party Get Job Order Invoice
|
||||
- id: tapi_jo.location.support
|
||||
label: Third Party Check Location Support
|
||||
- id: tapi_jo.nearest_hub.get
|
||||
label: Third Party Get Nearest Hub and Slots
|
||||
- id: tapi_jo.schedule_option.status
|
||||
label: Third Party Schedule Option Status
|
||||
- id: tapi_jo.get.info
|
||||
label: Third Party Get Job Order Info
|
||||
- id: tapi_service
|
||||
label: Third Party Service Access
|
||||
acls:
|
||||
- id: tapi_service.list
|
||||
label: List Third Party Services
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
|
|
@ -10,8 +11,7 @@ return [
|
|||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Catalyst\ApiBundle\CatalystApiBundle::class => ['all' => true],
|
||||
Catalyst\APIBundle\CatalystAPIBundle::class => ['all' => true],
|
||||
Catalyst\AuthBundle\CatalystAuthBundle::class => ['all' => true],
|
||||
Catalyst\MenuBundle\CatalystMenuBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,179 +0,0 @@
|
|||
main_menu:
|
||||
- id: home
|
||||
acl: dashboard.menu
|
||||
label: Dashboard
|
||||
icon: flaticon-line-graph
|
||||
- id: user
|
||||
acl: user.menu
|
||||
label: User
|
||||
icon: flaticon-users
|
||||
- id: user_list
|
||||
acl: user.list
|
||||
label: Users
|
||||
parent: user
|
||||
- id: role_list
|
||||
acl: role.list
|
||||
label: Roles
|
||||
parent: user
|
||||
|
||||
- id: apiuser
|
||||
acl: apiuser.menu
|
||||
label: API User
|
||||
icon: flaticon-users
|
||||
- id: api_user_list
|
||||
acl: apiuser.list
|
||||
label: API Users
|
||||
parent: apiuser
|
||||
- id: api_role_list
|
||||
acl: apirole.list
|
||||
label: API Roles
|
||||
parent: apiuser
|
||||
|
||||
- id: logistics
|
||||
acl: logistics.menu
|
||||
label: Logistics
|
||||
icon: fa fa-truck
|
||||
- id: rider_list
|
||||
acl: rider.list
|
||||
label: Riders
|
||||
parent: logistics
|
||||
- id: service_charge_list
|
||||
acl: service_charge.list
|
||||
label: Service Charges
|
||||
parent: logistics
|
||||
|
||||
- id: battery
|
||||
acl: battery.menu
|
||||
label: Battery
|
||||
icon: fa fa-battery-3
|
||||
- id: battery_list
|
||||
acl: battery.list
|
||||
label: Batteries
|
||||
parent: battery
|
||||
- id: bmfg_list
|
||||
acl: bmfg.list
|
||||
label: Manufacturers
|
||||
parent: battery
|
||||
- id: bmodel_list
|
||||
acl: bmodel.list
|
||||
label: Models
|
||||
parent: battery
|
||||
- id: bsize_list
|
||||
acl: bsize.list
|
||||
label: Sizes
|
||||
parent: battery
|
||||
- id: promo_list
|
||||
acl: promo.list
|
||||
label: Promos
|
||||
parent: battery
|
||||
|
||||
- id: vehicle
|
||||
acl: vehicle.menu
|
||||
label: Vehicle
|
||||
icon: fa fa-car
|
||||
- id: vehicle_list
|
||||
acl: vehicle.list
|
||||
label: Vehicles
|
||||
parent: vehicle
|
||||
- id: vmfg_list
|
||||
acl: vmfg.list
|
||||
label: Manufacturers
|
||||
parent: vehicle
|
||||
|
||||
- id: location
|
||||
acl: location.menu
|
||||
label: Location
|
||||
icon: fa fa-home
|
||||
- id: outlet_list
|
||||
acl: outlet.menu
|
||||
label: Outlet
|
||||
parent: location
|
||||
- id: hub_list
|
||||
acl: hub.menu
|
||||
label: Hub
|
||||
parent: location
|
||||
- id: geofence_list
|
||||
acl: geofence.menu
|
||||
label: Geofence
|
||||
parent: location
|
||||
|
||||
|
||||
- id: joborder
|
||||
acl: joborder.menu
|
||||
label: Job Order
|
||||
icon: flaticon-calendar-3
|
||||
- id: jo_onestep_form
|
||||
acl: jo_onestep.form
|
||||
label: One-step Process
|
||||
parent: joborder
|
||||
- id: jo_walkin_form
|
||||
acl: jo_walkin.form
|
||||
label: Walk-in
|
||||
parent: joborder
|
||||
- id: jo_open
|
||||
acl: jo_open.list
|
||||
label: Open
|
||||
parent: joborder
|
||||
- id: jo_all
|
||||
acl: jo_all.list
|
||||
label: View All
|
||||
parent: joborder
|
||||
|
||||
- id: support
|
||||
acl: support.menu
|
||||
label: Customer Support
|
||||
icon: flaticon-support
|
||||
- id: customer_list
|
||||
acl: customer.list
|
||||
label: Customers
|
||||
parent: support
|
||||
- id: ticket_list
|
||||
acl: ticket.list
|
||||
label: Tickets
|
||||
parent: support
|
||||
- id: general_search
|
||||
acl: general.search
|
||||
label: Search
|
||||
parent: support
|
||||
- id: warranty_search
|
||||
acl: warranty.search
|
||||
label: Customer Battery Search
|
||||
parent: support
|
||||
- id: privacy_policy_list
|
||||
acl: privacy_policy.list
|
||||
label: Privacy Policy
|
||||
parent: support
|
||||
- id: warranty_list
|
||||
acl: warranty.list
|
||||
label: Warranty
|
||||
parent: support
|
||||
- id: warranty_upload
|
||||
acl: warranty.upload
|
||||
label: Warranty Upload
|
||||
parent: support
|
||||
- id: static_content_list
|
||||
acl: static_content.list
|
||||
label: Static Content
|
||||
parent: support
|
||||
|
||||
- id: service
|
||||
acl: service.menu
|
||||
label: Other Services
|
||||
icon: flaticon-squares
|
||||
- id: service_list
|
||||
acl: service.list
|
||||
label: Services
|
||||
parent: service
|
||||
|
||||
- id: partner
|
||||
acl: partner.menu
|
||||
label: Partners
|
||||
icon: flaticon-network
|
||||
- id: partner_list
|
||||
acl: partner.list
|
||||
label: Partners
|
||||
parent: partner
|
||||
- id: review_list
|
||||
acl: review.list
|
||||
label: Reviews
|
||||
parent: partner
|
||||
|
|
@ -42,6 +42,20 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -50,7 +64,6 @@ services:
|
|||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$gmaps_api_key: "%env(GMAPS_API_KEY)%"
|
||||
$cust_dist_limit: "%env(CUST_DISTANCE_LIMIT)%"
|
||||
|
||||
App\Service\RisingTideGateway:
|
||||
arguments:
|
||||
|
|
@ -100,6 +113,50 @@ services:
|
|||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\CMBInvoiceGenerator: ~
|
||||
|
||||
|
|
@ -170,8 +227,3 @@ services:
|
|||
$redis_prov: "@App\\Service\\RedisClientProvider"
|
||||
$loc_key: "%env(LOCATION_RIDER_ACTIVE_KEY)%"
|
||||
$status_key: "%env(STATUS_RIDER_KEY)%"
|
||||
|
||||
# API logging
|
||||
App\EventSubscriber\LogSubscriber:
|
||||
arguments:
|
||||
$api_log_flag: "%env(API_LOGGING)%"
|
||||
|
|
|
|||
|
|
@ -63,28 +63,6 @@ main_menu:
|
|||
label: Promos
|
||||
parent: battery
|
||||
|
||||
- id: sapbattery
|
||||
acl: sap_battery.menu
|
||||
label: SAP Battery
|
||||
icon: fa fa-battery
|
||||
- id: sapbattery_list
|
||||
acl: sap_battery.list
|
||||
label: SAP Batteries
|
||||
parent: sapbattery
|
||||
- id: sapbrand_list
|
||||
acl: sap_brand.list
|
||||
label: SAP Battery Brands
|
||||
parent: sapbattery
|
||||
- id: sapbsize_list
|
||||
acl: sap_bsize.list
|
||||
label: SAP Battery Sizes
|
||||
parent: sapbattery
|
||||
- id: sapcsize_list
|
||||
acl: sap_csize.list
|
||||
label: SAP Container Sizes
|
||||
parent: sapbattery
|
||||
|
||||
|
||||
- id: vehicle
|
||||
acl: vehicle.menu
|
||||
label: Vehicle
|
||||
|
|
@ -110,10 +88,6 @@ main_menu:
|
|||
acl: hub.menu
|
||||
label: Hub
|
||||
parent: location
|
||||
- id: dealer_list
|
||||
acl: dealer.list
|
||||
label: Dealer
|
||||
parent: location
|
||||
- id: geofence_list
|
||||
acl: geofence.menu
|
||||
label: Geofence
|
||||
|
|
@ -124,6 +98,10 @@ main_menu:
|
|||
acl: joborder.menu
|
||||
label: Job Order
|
||||
icon: flaticon-calendar-3
|
||||
- id: jo_onestep_form
|
||||
acl: jo_onestep.form
|
||||
label: One-step Process
|
||||
parent: joborder
|
||||
- id: jo_in
|
||||
acl: jo_in.list
|
||||
label: Incoming
|
||||
|
|
@ -132,10 +110,6 @@ main_menu:
|
|||
acl: jo_proc.list
|
||||
label: Dispatch
|
||||
parent: joborder
|
||||
- id: jo_resq_proc
|
||||
acl: jo_resq_proc.list
|
||||
label: RESQ Dispatch
|
||||
parent: joborder
|
||||
- id: jo_assign
|
||||
acl: jo_assign.list
|
||||
label: Rider Assignment
|
||||
|
|
@ -152,10 +126,6 @@ main_menu:
|
|||
acl: jo_all.list
|
||||
label: View All
|
||||
parent: joborder
|
||||
- id: jo_hub_view
|
||||
acl: jo_hub.list
|
||||
label: Hub View
|
||||
parent: joborder
|
||||
|
||||
- id: support
|
||||
acl: support.menu
|
||||
|
|
@ -193,10 +163,6 @@ main_menu:
|
|||
acl: static_content.list
|
||||
label: Static Content
|
||||
parent: support
|
||||
- id: customertag_list
|
||||
acl: customer_tag.list
|
||||
label: Customer Tags
|
||||
parent: support
|
||||
|
||||
- id: service
|
||||
acl: service.menu
|
||||
|
|
@ -219,37 +185,3 @@ main_menu:
|
|||
acl: review.list
|
||||
label: Reviews
|
||||
parent: partner
|
||||
|
||||
- id: analytics
|
||||
acl: analytics.menu
|
||||
label: Analytics
|
||||
icon: flaticon-graphic
|
||||
- id: analytics_forecast_form
|
||||
acl: analytics.forecast
|
||||
label: Forecasting
|
||||
parent: analytics
|
||||
|
||||
- id: database
|
||||
acl: database.menu
|
||||
label: Database
|
||||
icon: fa fa-database
|
||||
- id: ticket_type_list
|
||||
acl: ticket_type.menu
|
||||
label: Ticket Types
|
||||
parent: database
|
||||
- id: subticket_type_list
|
||||
acl: subticket_type.menu
|
||||
label: Sub Ticket Types
|
||||
parent: database
|
||||
- id: emergency_type_list
|
||||
acl: emergency_type.menu
|
||||
label: Emergency Types
|
||||
parent: database
|
||||
- id: ownership_type_list
|
||||
acl: ownership_type.menu
|
||||
label: Ownership Types
|
||||
parent: database
|
||||
- id: customer_location_list
|
||||
acl: cust_location.menu
|
||||
label: Customer Locations
|
||||
parent: database
|
||||
|
|
|
|||
|
|
@ -1,944 +0,0 @@
|
|||
catalyst_auth:
|
||||
main:
|
||||
user_entity: "App\\Entity\\User"
|
||||
acl_data:
|
||||
- id: dashboard
|
||||
label: Dashboard Access
|
||||
acls:
|
||||
- id: dashboard.menu
|
||||
label: Menu
|
||||
- id: user
|
||||
label: User Access
|
||||
acls:
|
||||
- id: user.menu
|
||||
label: Menu
|
||||
- id: user.list
|
||||
label: List
|
||||
- id: user.add
|
||||
label: Add
|
||||
- id: user.update
|
||||
label: Update
|
||||
- id: user.delete
|
||||
label: Delete
|
||||
- id: user.role.sadmin
|
||||
label: Super Admin Role
|
||||
- id: user.profile
|
||||
label: User Profile
|
||||
- id: role
|
||||
label: Role Access
|
||||
acls:
|
||||
- id: role.menu
|
||||
label: Menu
|
||||
- id: role.list
|
||||
label: List
|
||||
- id: role.add
|
||||
label: Add
|
||||
- id: role.update
|
||||
label: Update
|
||||
- id: role.delete
|
||||
label: Delete
|
||||
- id: apiuser
|
||||
label: API User Access
|
||||
acls:
|
||||
- id: apiuser.menu
|
||||
label: Menu
|
||||
- id: apiuser.list
|
||||
label: List
|
||||
- id: apiuser.add
|
||||
label: Add
|
||||
- id: apiuser.update
|
||||
label: Update
|
||||
- id: apiuser.delete
|
||||
label: Delete
|
||||
- id: apirole
|
||||
label: API Role Access
|
||||
acls:
|
||||
- id: apirole.menu
|
||||
label: Menu
|
||||
- id: apirole.list
|
||||
label: List
|
||||
- id: apirole.add
|
||||
label: Add
|
||||
- id: apirole.update
|
||||
label: Update
|
||||
- id: apirole.delete
|
||||
label: Delete
|
||||
- id: logistics
|
||||
label: Logistics Access
|
||||
acls:
|
||||
- id: logistics.menu
|
||||
label: Menu
|
||||
- id: battery
|
||||
label: Battery Access
|
||||
acls:
|
||||
- id: battery.menu
|
||||
label: Menu
|
||||
- id: battery.list
|
||||
label: List
|
||||
- id: battery.add
|
||||
label: Add
|
||||
- id: battery.update
|
||||
label: Update
|
||||
- id: battery.delete
|
||||
label: Delete
|
||||
- id: bmfg
|
||||
label: Battery Manufacturer Access
|
||||
acls:
|
||||
- id: bmfg.menu
|
||||
label: Menu
|
||||
- id: bmfg.list
|
||||
label: List
|
||||
- id: bmfg.add
|
||||
label: Add
|
||||
- id: bmfg.update
|
||||
label: Update
|
||||
- id: bmfg.delete
|
||||
label: Delete
|
||||
- id: bmodel
|
||||
label: Battery Model Access
|
||||
acls:
|
||||
- id: bmodel.menu
|
||||
label: Menu
|
||||
- id: bmodel.list
|
||||
label: List
|
||||
- id: bmodel.add
|
||||
label: Add
|
||||
- id: bmodel.update
|
||||
label: Update
|
||||
- id: bmodel.delete
|
||||
label: Delete
|
||||
- id: bsize
|
||||
label: Battery Size Access
|
||||
acls:
|
||||
- id: bsize.menu
|
||||
label: Menu
|
||||
- id: bsize.list
|
||||
label: List
|
||||
- id: bsize.add
|
||||
label: Add
|
||||
- id: bsize.update
|
||||
label: Update
|
||||
- id: bsize.delete
|
||||
label: Delete
|
||||
- id: vehicle
|
||||
label: Vehicle Access
|
||||
acls:
|
||||
- id: vehicle.menu
|
||||
label: Menu
|
||||
- id: vehicle.list
|
||||
label: List
|
||||
- id: vehicle.add
|
||||
label: Add
|
||||
- id: vehicle.update
|
||||
label: Update
|
||||
- id: vehicle.delete
|
||||
label: Delete
|
||||
- id: vmfg
|
||||
label: Vehicle Manufacturer Access
|
||||
acls:
|
||||
- id: vmfg.menu
|
||||
label: Menu
|
||||
- id: vmfg.list
|
||||
label: List
|
||||
- id: vmfg.add
|
||||
label: Add
|
||||
- id: vmfg.update
|
||||
label: Update
|
||||
- id: vmfg.delete
|
||||
label: Delete
|
||||
- id: customer
|
||||
label: Customer Access
|
||||
acls:
|
||||
- id: customer.menu
|
||||
label: Menu
|
||||
- id: customer.list
|
||||
label: List
|
||||
- id: customer.add
|
||||
label: Add
|
||||
- id: customer.update
|
||||
label: Update
|
||||
- id: customer.delete
|
||||
label: Delete
|
||||
- id: customer.dpa
|
||||
label: Display DPA
|
||||
|
||||
|
||||
- id: location
|
||||
label: Location Access
|
||||
acls:
|
||||
- id: location.menu
|
||||
label: Menu
|
||||
- id: outlet
|
||||
label: Outlet Access
|
||||
acls:
|
||||
- id: outlet.menu
|
||||
label: Menu
|
||||
- id: outlet.list
|
||||
label: List
|
||||
- id: outlet.add
|
||||
label: Add
|
||||
- id: outlet.update
|
||||
label: Update
|
||||
- id: outlet.delete
|
||||
label: Delete
|
||||
- id: hub
|
||||
label: Hub Access
|
||||
acls:
|
||||
- id: hub.menu
|
||||
label: Menu
|
||||
- id: hub.list
|
||||
label: List
|
||||
- id: hub.add
|
||||
label: Add
|
||||
- id: hub.update
|
||||
label: Update
|
||||
- id: hub.delete
|
||||
label: Delete
|
||||
- id: geofence
|
||||
label: Geofence
|
||||
acls:
|
||||
- id: geofence.menu
|
||||
label: Menu
|
||||
- id: geofence.list
|
||||
label: List
|
||||
- id: geofence.add
|
||||
label: Add
|
||||
- id: geofence.delete
|
||||
label: Delete
|
||||
|
||||
- id: rider
|
||||
label: Rider Access
|
||||
acls:
|
||||
- id: rider.menu
|
||||
label: Menu
|
||||
- id: rider.list
|
||||
label: List
|
||||
- id: rider.add
|
||||
label: Add
|
||||
- id: rider.update
|
||||
label: Update
|
||||
- id: rider.delete
|
||||
label: Delete
|
||||
|
||||
- id: servicecharge
|
||||
label: Service Charge
|
||||
acls:
|
||||
- id: service_charge.menu
|
||||
label: Menu
|
||||
- id: service_charge.list
|
||||
label: List
|
||||
- id: service_charge.add
|
||||
label: Add
|
||||
- id: service_charge.update
|
||||
label: Update
|
||||
- id: service_charge.delete
|
||||
label: Delete
|
||||
|
||||
- id: joborder
|
||||
label: Job Order
|
||||
acls:
|
||||
- id: joborder.menu
|
||||
label: Menu
|
||||
- id: jo_in.list
|
||||
label: Incoming
|
||||
- id: jo_proc.list
|
||||
label: Dispatch
|
||||
- id: jo_proc.unlock
|
||||
label: Dispatch Unlock
|
||||
- id: jo_assign.list
|
||||
label: Rider Assignment
|
||||
- id: jo_assign.unlock
|
||||
label: Rider Assignment Unlock
|
||||
- id: jo_fulfill.list
|
||||
label: Fulfillment
|
||||
- id: jo_open.list
|
||||
label: Open
|
||||
- id: jo_all.list
|
||||
label: View All
|
||||
- id: jo_pdf.list
|
||||
label: PDF
|
||||
- id: jo_open.edit
|
||||
label: Edit
|
||||
- id: joborder.cancel
|
||||
label: Cancel
|
||||
- id: jo_onestep.form
|
||||
label: One-step Process
|
||||
- id: jo_onestep.edit
|
||||
label: One-step Process Edit
|
||||
- id: jo_walkin.form
|
||||
label: Walk-in
|
||||
- id: jo_walkin.edit
|
||||
label: Walk-in Edit
|
||||
- id: jo_autoassign.test
|
||||
label: Autoassign Test
|
||||
- id: jo_hub.list
|
||||
label: Hub View
|
||||
- id: jo_cancel.fulfill
|
||||
label: Fulfill Cancelled JO
|
||||
- id: jo_resq_proc.list
|
||||
label: RESQ Dispatch
|
||||
- id: jo_resq_all.list
|
||||
label: RESQ All
|
||||
|
||||
- id: support
|
||||
label: Customer Support Access
|
||||
acls:
|
||||
- id: support.menu
|
||||
label: Menu
|
||||
- id: general.search
|
||||
label: Search
|
||||
- id: warranty.search
|
||||
label: Customer Battery Search
|
||||
- id: warranty.upload
|
||||
label: Warranty Upload
|
||||
|
||||
- id: ticket
|
||||
label: Ticket Access
|
||||
acls:
|
||||
- id: ticket.menu
|
||||
label: Menu
|
||||
- id: ticket.list
|
||||
label: List
|
||||
- id: ticket.add
|
||||
label: Add
|
||||
- id: ticket.update
|
||||
label: Update
|
||||
- id: ticket.delete
|
||||
label: Delete
|
||||
|
||||
- id: promo
|
||||
label: Promo Access
|
||||
acls:
|
||||
- id: promo.menu
|
||||
label: Menu
|
||||
- id: promo.list
|
||||
label: List
|
||||
- id: promo.add
|
||||
label: Add
|
||||
- id: promo.update
|
||||
label: Update
|
||||
- id: promo.delete
|
||||
label: Delete
|
||||
|
||||
- id: report
|
||||
label: Reports
|
||||
acls:
|
||||
- id: report.menu
|
||||
label: Menu
|
||||
- id: report.reject
|
||||
label: Rejection Report
|
||||
- id: report.battery.conflict
|
||||
label: Battery Conflict Report
|
||||
- id: report.popapp.comparison
|
||||
label: Popapp Comparison Report
|
||||
- id: report.meh.customer
|
||||
label: RESQ MEH Customer Report
|
||||
- id: report.warranty.class
|
||||
label: Warranty Class Report
|
||||
- id: report.vehicle.battery.compatibility
|
||||
label: Vehicle Battery Compatibility Report
|
||||
- id: report.warranty.details
|
||||
label: Warranty Details Report
|
||||
- id: report.jo.details
|
||||
label: Job Order Details Report
|
||||
- id: report.jo_events
|
||||
label: Job Order Events Report
|
||||
- id: report.sms_messages
|
||||
label: SMS Messages Report
|
||||
- id: report.jo.auto_assign
|
||||
label: Auto Assigned Job Order Report
|
||||
- id: report.jo.advance_order
|
||||
label: Advance Order Job Order Report
|
||||
- id: report.customer.source
|
||||
label: Customer Source Report
|
||||
- id: report.hub.filter
|
||||
label: Hub Filter Report
|
||||
- id: report.warranty.raffle
|
||||
label: Warranty Raffle Report
|
||||
- id: report.jo.raffle
|
||||
label: JO Raffle Report
|
||||
|
||||
- id: service
|
||||
label: Other Services
|
||||
acls:
|
||||
- id: service.menu
|
||||
label: Menu
|
||||
- id: service.list
|
||||
label: List
|
||||
- id: service.add
|
||||
label: Add
|
||||
- id: service.update
|
||||
label: Update
|
||||
- id: service.delete
|
||||
label: Delete
|
||||
|
||||
- id: partner
|
||||
label: Partners
|
||||
acls:
|
||||
- id: partner.menu
|
||||
label: Menu
|
||||
- id: partner.list
|
||||
label: List
|
||||
- id: partner.add
|
||||
label: Add
|
||||
- id: partner.update
|
||||
label: Update
|
||||
- id: partner.delete
|
||||
label: Delete
|
||||
|
||||
- id: motolite_event
|
||||
label: Motolite Events
|
||||
acls:
|
||||
- id: motolite_event.menu
|
||||
label: Menu
|
||||
- id: motolite_event.list
|
||||
label: List
|
||||
- id: motolite_event.add
|
||||
label: Add
|
||||
- id: motolite_event.update
|
||||
label: Update
|
||||
- id: motolite_event.delete
|
||||
label: Delete
|
||||
|
||||
- id: review
|
||||
label: Reviews
|
||||
acls:
|
||||
- id: review.menu
|
||||
label: Menu
|
||||
- id: review.list
|
||||
label: List
|
||||
- id: review.view
|
||||
label: View
|
||||
- id: review.delete
|
||||
label: Delete
|
||||
|
||||
- id: privacypolicy
|
||||
label: Privacy Policy
|
||||
acls:
|
||||
- id: privacy_policy.menu
|
||||
label: Menu
|
||||
- id: privacy_policy.list
|
||||
label: List
|
||||
- id: privacy_policy.add
|
||||
label: Add
|
||||
- id: privacy_policy.update
|
||||
label: Update
|
||||
- id: privacy_policy.delete
|
||||
label: Delete
|
||||
|
||||
- id: warranty
|
||||
label: Warranty
|
||||
acls:
|
||||
- id: warranty.menu
|
||||
label: Menu
|
||||
- id: warranty.list
|
||||
label: List
|
||||
- id: warranty.add
|
||||
label: Add
|
||||
- id: warranty.update
|
||||
label: Update
|
||||
|
||||
- id: staticcontent
|
||||
label: Static Content
|
||||
acls:
|
||||
- id: static_content.menu
|
||||
label: Menu
|
||||
- id: static_content.list
|
||||
label: List
|
||||
- id: static_content.add
|
||||
label: Add
|
||||
- id: static_content.update
|
||||
label: Update
|
||||
- id: static_content.delete
|
||||
label: Delete
|
||||
|
||||
- id: analytics
|
||||
label: Analytics
|
||||
acls:
|
||||
- id: analytics.menu
|
||||
label: Menu
|
||||
- id: analytics.forecast
|
||||
label: Forecasting
|
||||
|
||||
- id: sap_battery
|
||||
label: SAP Battery Access
|
||||
acls:
|
||||
- id: sap_battery.menu
|
||||
label: Menu
|
||||
- id: sap_battery.list
|
||||
label: List
|
||||
- id: sap_battery.add
|
||||
label: Add
|
||||
- id: sap_battery.update
|
||||
label: Update
|
||||
- id: sap_battery.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_brand
|
||||
label: SAP Battery Brand Access
|
||||
acls:
|
||||
- id: sap_brand.menu
|
||||
label: Menu
|
||||
- id: sap_brand.list
|
||||
label: List
|
||||
- id: sap_brand.add
|
||||
label: Add
|
||||
- id: sap_brand.update
|
||||
label: Update
|
||||
- id: sap_brand.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_bsize
|
||||
label: SAP Battery Size Access
|
||||
acls:
|
||||
- id: sap_bsize.menu
|
||||
label: Menu
|
||||
- id: sap_bsize.list
|
||||
label: List
|
||||
- id: sap_bsize.add
|
||||
label: Add
|
||||
- id: sap_bsize.update
|
||||
label: Update
|
||||
- id: sap_bsize.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_csize
|
||||
label: SAP Battery Container Size Access
|
||||
acls:
|
||||
- id: sap_csize.menu
|
||||
label: Menu
|
||||
- id: sap_csize.list
|
||||
label: List
|
||||
- id: sap_csize.add
|
||||
label: Add
|
||||
- id: sap_csize.update
|
||||
label: Update
|
||||
- id: sap_csize.delete
|
||||
label: Delete
|
||||
|
||||
- id: customer_tag
|
||||
label: Customer Tags Access
|
||||
acls:
|
||||
- id: customer_tag.menu
|
||||
label: Menu
|
||||
- id: customer_tag.list
|
||||
label: List
|
||||
- id: customer_tag.add
|
||||
label: Add
|
||||
- id: customer_tag.update
|
||||
label: Update
|
||||
- id: customer_tag.delete
|
||||
label: Delete
|
||||
|
||||
- id: review_tag
|
||||
label: Review Tags Access
|
||||
acls:
|
||||
- id: review_tag.menu
|
||||
label: Menu
|
||||
- id: review_tag.list
|
||||
label: List
|
||||
- id: review_tag.add
|
||||
label: Add
|
||||
- id: review_tag.update
|
||||
label: Update
|
||||
- id: review_tag.delete
|
||||
label: Delete
|
||||
|
||||
- id: dealer
|
||||
label: Dealer Access
|
||||
acls:
|
||||
- id: dealer.menu
|
||||
label: Menu
|
||||
- id: dealer.list
|
||||
label: List
|
||||
- id: dealer.add
|
||||
label: Add
|
||||
- id: dealer.update
|
||||
label: Update
|
||||
- id: dealer.delete
|
||||
label: Delete
|
||||
|
||||
- id: database
|
||||
label: Database Access
|
||||
acls:
|
||||
- id: database.menu
|
||||
label: Menu
|
||||
|
||||
- id: ticket_type
|
||||
label: Ticket Type Access
|
||||
acls:
|
||||
- id: ticket_type.menu
|
||||
label: Menu
|
||||
- id: ticket_type.list
|
||||
label: List
|
||||
- id: ticket_type.add
|
||||
label: Add
|
||||
- id: ticket_type.update
|
||||
label: Update
|
||||
- id: ticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: subticket_type
|
||||
label: Sub Ticket Type Access
|
||||
acls:
|
||||
- id: subticket_type.menu
|
||||
label: Menu
|
||||
- id: subticket_type.list
|
||||
label: List
|
||||
- id: subticket_type.add
|
||||
label: Add
|
||||
- id: subticket_type.update
|
||||
label: Update
|
||||
- id: subticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: emergency_type
|
||||
label: Emergency Type Access
|
||||
acls:
|
||||
- id: emergency_type.menu
|
||||
label: Menu
|
||||
- id: emergency_type.list
|
||||
label: List
|
||||
- id: emergency_type.add
|
||||
label: Add
|
||||
- id: emergency_type.update
|
||||
label: Update
|
||||
- id: emergency_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: ownership_type
|
||||
label: Ownership Type Access
|
||||
acls:
|
||||
- id: ownership_type.menu
|
||||
label: Menu
|
||||
- id: ownership_type.list
|
||||
label: List
|
||||
- id: ownership_type.add
|
||||
label: Add
|
||||
- id: ownership_type.update
|
||||
label: Update
|
||||
- id: ownership_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: service_offering
|
||||
label: Service Offering Access
|
||||
acls:
|
||||
- id: service_offering.menu
|
||||
label: Menu
|
||||
- id: service_offering.list
|
||||
label: List
|
||||
- id: service_offering.add
|
||||
label: Add
|
||||
- id: service_offering.update
|
||||
label: Update
|
||||
- id: service_offering.delete
|
||||
label: Delete
|
||||
|
||||
- id: price_tier
|
||||
label: Price Tier
|
||||
acls:
|
||||
- id: price_tier.menu
|
||||
label: Menu
|
||||
- id: price_tier.list
|
||||
label: List
|
||||
- id: price_tier.add
|
||||
label: Add
|
||||
- id: price_tier.update
|
||||
label: Update
|
||||
- id: price_tier.delete
|
||||
label: Delete
|
||||
|
||||
- id: item_type
|
||||
label: Item Type
|
||||
acls:
|
||||
- id: item_type.menu
|
||||
label: Menu
|
||||
- id: item_type.list
|
||||
label: List
|
||||
- id: item_type.add
|
||||
label: Add
|
||||
- id: item_type.update
|
||||
label: Update
|
||||
- id: item_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: item
|
||||
label: Item
|
||||
acls:
|
||||
- id: item.menu
|
||||
label: Menu
|
||||
- id: item_pricing
|
||||
label: Item Pricing
|
||||
acls:
|
||||
- id: item_pricing.update
|
||||
label: Update
|
||||
|
||||
api:
|
||||
user_entity: "App\\Entity\\ApiUser"
|
||||
acl_data:
|
||||
- id: warranty
|
||||
label: Warranty Access
|
||||
acls:
|
||||
- id: warranty.list
|
||||
label: List
|
||||
- id: warranty.find.serial
|
||||
label: Find by Serial
|
||||
- id: warranty.find.platenumber
|
||||
label: Find by Plate Number
|
||||
- id: warranty.register.battery
|
||||
label: Register Battery
|
||||
- id: warranty.claim
|
||||
label: Claim
|
||||
- id: warranty.update
|
||||
label: Update
|
||||
- id: warranty.cancel
|
||||
label: Cancel
|
||||
- id: warranty.delete
|
||||
label: Delete
|
||||
- id: warranty.set.privacypolicy
|
||||
label: Set Privacy Policy
|
||||
- id: warranty.list.serial
|
||||
label: List by Serial
|
||||
- id: batterybrand
|
||||
label: Battery Brand Access
|
||||
acls:
|
||||
- id: batterybrand.list
|
||||
label: List
|
||||
- id: batterysize
|
||||
label: Battery Size Access
|
||||
acls:
|
||||
- id: batterysize.list
|
||||
label: List
|
||||
- id: battery
|
||||
label: Battery Access
|
||||
acls:
|
||||
- id: battery.list
|
||||
label: List
|
||||
- id: vmanufacturer
|
||||
label: Vehicle Manufacturer Access
|
||||
acls:
|
||||
- id: vmanufacturer.list
|
||||
label: List
|
||||
- id: vehicle
|
||||
label: Vehicle Access
|
||||
acls:
|
||||
- id: vehicle.list
|
||||
label: List
|
||||
- id: privacypolicy
|
||||
label: Privacy Policy
|
||||
acls:
|
||||
- id: privacypolicy.find
|
||||
label: Find Privacy Policy
|
||||
- id: customer
|
||||
label: Customer
|
||||
acls:
|
||||
- id: customer.register
|
||||
label: Register Customer
|
||||
- id: customer.verify
|
||||
label: Verify Customer
|
||||
- id: municipality
|
||||
label: Municipality
|
||||
acls:
|
||||
- id: municipality.list
|
||||
label: List
|
||||
- id: dealer
|
||||
label: Dealer
|
||||
acls:
|
||||
- id: dealer.list
|
||||
label: List
|
||||
- id: warrantyserial
|
||||
label: Warranty Serial
|
||||
acls:
|
||||
- id: warrantyserial.upload
|
||||
label: Upload
|
||||
- id: hub
|
||||
label: Hub Access
|
||||
acls:
|
||||
- id: hub.list
|
||||
label: List
|
||||
- id: joborder
|
||||
label: Job Order Access
|
||||
acls:
|
||||
- id: joborder.find
|
||||
label: Find Job Order
|
||||
|
||||
- id: tapi_vmanufacturer
|
||||
label: Third Party Vehicle Manufacturer Access
|
||||
acls:
|
||||
- id: tapi_vmanufacturer.list
|
||||
label: List Third Party Vehicle Manufacturers
|
||||
- id: tapi_vehicle
|
||||
label: Third Party Vehicle Make Access
|
||||
acls:
|
||||
- id: tapi_vehicle.list
|
||||
label: List Third Party Vehicles
|
||||
- id: tapi_promo
|
||||
label: Third Party Promo Access
|
||||
acls:
|
||||
- id: tapi_promo.list
|
||||
label: List Third Party Promos
|
||||
- id: tapi_battery
|
||||
label: Third Party Battery Access
|
||||
acls:
|
||||
- id: tapi_battery_compatible.list
|
||||
label: List Third Party Compatible Batteries
|
||||
- id: tapi_jo
|
||||
label: Third Party Job Order Access
|
||||
acls:
|
||||
- id: tapi_jo.request
|
||||
label: Third Party Request Job Order
|
||||
- id: tapi_jo.get.estimate
|
||||
label: Third Party Get Estimate
|
||||
- id: tapi_jo.get.ongoing
|
||||
label: Third Party Get Ongoing Job Order
|
||||
- id: tapi_jo.cancel
|
||||
label: Third Party Cancel Job Order
|
||||
- id: tapi_jo.get.invoice
|
||||
label: Third Party Get Job Order Invoice
|
||||
- id: tapi_jo.location.support
|
||||
label: Third Party Check Location Support
|
||||
- id: tapi_jo.nearest_hub.get
|
||||
label: Third Party Get Nearest Hub and Slots
|
||||
- id: tapi_jo.schedule_option.status
|
||||
label: Third Party Schedule Option Status
|
||||
- id: tapi_jo.get.info
|
||||
label: Third Party Get Job Order Info
|
||||
- id: tapi_service
|
||||
label: Third Party Service Access
|
||||
acls:
|
||||
- id: tapi_service.list
|
||||
label: List Third Party Services
|
||||
|
||||
cust_api_v2:
|
||||
user_entity: "App\\Entity\\CustomerUser"
|
||||
acl_data:
|
||||
- id: cust_api_v2.auth
|
||||
label: Authentication
|
||||
acls:
|
||||
- id: cust_api_v2.auth.register
|
||||
label: Register
|
||||
- id: cust_api_v2.auth.confirm
|
||||
label: Confirm Number
|
||||
- id: cust_api_v2.auth.validate
|
||||
label: Validate Code
|
||||
- id: cust_api_v2.auth.resend_code
|
||||
label: Resend Code
|
||||
- id: cust_api_v2.customer
|
||||
label: Customer
|
||||
acls:
|
||||
- id: cust_api_v2.customer.info
|
||||
label: Info
|
||||
- id: cust_api_v2.customer.update
|
||||
label: Update
|
||||
- id: cust_api_v2.customer.status
|
||||
label: Status
|
||||
- id: cust_api_v2.customer.hash
|
||||
label: Hash
|
||||
- id: cust_api_v2.device
|
||||
label: Device
|
||||
acls:
|
||||
- id: cust_api_v2.device.id
|
||||
label: Update
|
||||
- id: cust_api_v2.invoice
|
||||
label: Invoice
|
||||
acls:
|
||||
- id: cust_api_v2.invoice.estimate
|
||||
label: Estimate
|
||||
- id: cust_api_v2.jo
|
||||
label: Job Order
|
||||
acls:
|
||||
- id: cust_api_v2.jo.ongoing
|
||||
label: List Ongoing
|
||||
- id: cust_api_v2.jo.invoice
|
||||
label: Get Invoice
|
||||
- id: cust_api_v2.jo.cancel
|
||||
label: Cancel
|
||||
- id: cust_api_v2.jo.info
|
||||
label: Info
|
||||
- id: cust_api_v2.jo.history
|
||||
label: History
|
||||
- id: cust_api_v2.jo.latest
|
||||
label: Latest
|
||||
- id: cust_api_v2.jo.all_ongoing
|
||||
label: List All Ongoing
|
||||
- id: cust_api_v2.jo.ongoing_count
|
||||
label: List Ongoing Count
|
||||
- id: cust_api_v2.jo.create
|
||||
label: Create
|
||||
- id: cust_api_v2.jo.request
|
||||
label: Request
|
||||
- id: cust_api_v2.jo.completed
|
||||
label: List Completed
|
||||
- id: cust_api_v2.location
|
||||
label: Location
|
||||
acls:
|
||||
- id: cust_api_v2.location.support
|
||||
label: Get Support Status
|
||||
- id: cust_api_v2.location.nearest_hub_and_slots
|
||||
label: List Nearest Hub and Slots
|
||||
- id: cust_api_v2.location.create
|
||||
label: Create
|
||||
- id: cust_api_v2.location.list
|
||||
label: List
|
||||
- id: cust_api_v2.partner
|
||||
label: Partner
|
||||
acls:
|
||||
- id: cust_api_v2.partner.info
|
||||
label: Info
|
||||
- id: cust_api_v2.partner.closest
|
||||
label: List Closest Partners
|
||||
- id: cust_api_v2.partner.review
|
||||
label: Review
|
||||
- id: cust_api_v2.privacy
|
||||
label: Privacy
|
||||
acls:
|
||||
- id: cust_api_v2.privacy.settings
|
||||
label: Get Privacy Settings
|
||||
- id: cust_api_v2.promo
|
||||
label: Promo
|
||||
acls:
|
||||
- id: cust_api_v2.promo.list
|
||||
label: Get Promos
|
||||
- id: cust_api_v2.rider
|
||||
label: Rider
|
||||
acls:
|
||||
- id: cust_api_v2.rider.status
|
||||
label: Status
|
||||
- id: cust_api_v2.rider.rating
|
||||
label: Rate
|
||||
- id: cust_api_v2.schedule
|
||||
label: Schedule
|
||||
acls:
|
||||
- id: cust_api_v2.schedule.status
|
||||
label: Get Schedule Option Status
|
||||
- id: cust_api_v2.service
|
||||
label: Service
|
||||
acls:
|
||||
- id: cust_api_v2.service.list
|
||||
label: List
|
||||
- id: cust_api_v2.vehicle
|
||||
label: Vehicle
|
||||
acls:
|
||||
- id: cust_api_v2.vehicle.mfgs
|
||||
label: List Manufacturers
|
||||
- id: cust_api_v2.vehicle.makes
|
||||
label: List Makes
|
||||
- id: cust_api_v2.vehicle.create
|
||||
label: Add
|
||||
- id: cust_api_v2.vehicle.update
|
||||
label: Update
|
||||
- id: cust_api_v2.vehicle.list
|
||||
label: List
|
||||
- id: cust_api_v2.vehicle.batteries
|
||||
label: Compatible Batteries
|
||||
- id: cust_api_v2.vehicle.delete
|
||||
label: Delete
|
||||
- id: cust_api_v2.warranty
|
||||
label: Warranty
|
||||
acls:
|
||||
- id: cust_api_v2.warranty.activate
|
||||
label: Activate
|
||||
- id: cust_api_v2.warranty.check
|
||||
label: Check Status
|
||||
- id: cust_api_v2.warranty.register
|
||||
label: Register
|
||||
|
|
@ -1,308 +0,0 @@
|
|||
catalyst_menu:
|
||||
main:
|
||||
- id: home
|
||||
acl: dashboard.menu
|
||||
label: '[menu.dashboard]'
|
||||
icon: flaticon-line-graph
|
||||
order: 1
|
||||
|
||||
|
||||
- id: user
|
||||
acl: user.menu
|
||||
label: '[menu.user]'
|
||||
icon: flaticon-users
|
||||
order: 2
|
||||
- id: user_list
|
||||
acl: user.list
|
||||
label: '[menu.user.users]'
|
||||
parent: user
|
||||
- id: role_list
|
||||
acl: role.list
|
||||
label: '[menu.user.roles]'
|
||||
parent: user
|
||||
|
||||
- id: apiuser
|
||||
acl: apiuser.menu
|
||||
label: '[menu.apiuser]'
|
||||
icon: flaticon-users
|
||||
order: 3
|
||||
- id: api_user_list
|
||||
acl: apiuser.list
|
||||
label: '[menu.apiuser.users]'
|
||||
parent: apiuser
|
||||
- id: api_role_list
|
||||
acl: apirole.list
|
||||
label: '[menu.apiuser.roles]'
|
||||
parent: apiuser
|
||||
|
||||
- id: logistics
|
||||
acl: logistics.menu
|
||||
label: '[menu.logistics]'
|
||||
icon: fa fa-truck
|
||||
order: 4
|
||||
- id: rider_list
|
||||
acl: rider.list
|
||||
label: '[menu.logistics.riders]'
|
||||
parent: logistics
|
||||
|
||||
- id: battery
|
||||
acl: battery.menu
|
||||
label: '[menu.battery]'
|
||||
icon: fa fa-battery-3
|
||||
order: 5
|
||||
- id: battery_list
|
||||
acl: battery.list
|
||||
label: '[menu.battery.batteries]'
|
||||
parent: battery
|
||||
- id: bmfg_list
|
||||
acl: bmfg.list
|
||||
label: '[menu.battery.manufacturers]'
|
||||
parent: battery
|
||||
- id: bmodel_list
|
||||
acl: bmodel.list
|
||||
label: '[menu.battery.models]'
|
||||
parent: battery
|
||||
- id: bsize_list
|
||||
acl: bsize.list
|
||||
label: '[menu.battery.sizes]'
|
||||
parent: battery
|
||||
- id: promo_list
|
||||
acl: promo.list
|
||||
label: '[menu.battery.promos]'
|
||||
parent: battery
|
||||
|
||||
- id: sapbattery
|
||||
acl: sap_battery.menu
|
||||
label: '[menu.sapbattery]'
|
||||
icon: fa fa-battery
|
||||
order: 6
|
||||
- id: sapbattery_list
|
||||
acl: sap_battery.list
|
||||
label: '[menu.sapbattery.batteries]'
|
||||
parent: sapbattery
|
||||
- id: sapbrand_list
|
||||
acl: sap_brand.list
|
||||
label: '[menu.sapbattery.brands]'
|
||||
parent: sapbattery
|
||||
- id: sapbsize_list
|
||||
acl: sap_bsize.list
|
||||
label: '[menu.sapbattery.sizes]'
|
||||
parent: sapbattery
|
||||
- id: sapcsize_list
|
||||
acl: sap_csize.list
|
||||
label: '[menu.sapbattery.csizes]'
|
||||
parent: sapbattery
|
||||
|
||||
|
||||
- id: vehicle
|
||||
acl: vehicle.menu
|
||||
label: '[menu.vehicle]'
|
||||
icon: fa fa-car
|
||||
order: 7
|
||||
- id: vehicle_list
|
||||
acl: vehicle.list
|
||||
label: '[menu.vehicle.vehicles]'
|
||||
parent: vehicle
|
||||
- id: vmfg_list
|
||||
acl: vmfg.list
|
||||
label: '[menu.vehicle.manufacturers]'
|
||||
parent: vehicle
|
||||
|
||||
- id: location
|
||||
acl: location.menu
|
||||
label: '[menu.location]'
|
||||
icon: fa fa-home
|
||||
order: 8
|
||||
- id: outlet_list
|
||||
acl: outlet.menu
|
||||
label: '[menu.location.outlets]'
|
||||
parent: location
|
||||
- id: hub_list
|
||||
acl: hub.menu
|
||||
label: '[menu.location.hubs]'
|
||||
parent: location
|
||||
- id: dealer_list
|
||||
acl: dealer.list
|
||||
label: '[menu.location.dealers]'
|
||||
parent: location
|
||||
- id: geofence_list
|
||||
acl: geofence.menu
|
||||
label: '[menu.location.geofence]'
|
||||
parent: location
|
||||
|
||||
|
||||
- id: joborder
|
||||
acl: joborder.menu
|
||||
label: '[menu.joborder]'
|
||||
icon: flaticon-calendar-3
|
||||
order: 9
|
||||
- id: jo_in
|
||||
acl: jo_in.list
|
||||
label: '[menu.joborder.incoming]'
|
||||
parent: joborder
|
||||
- id: jo_proc
|
||||
acl: jo_proc.list
|
||||
label: '[menu.joborder.dispatch]'
|
||||
parent: joborder
|
||||
- id: jo_resq_proc
|
||||
acl: jo_resq_proc.list
|
||||
label: '[menu.joborder.resqdispatch]'
|
||||
parent: joborder
|
||||
- id: jo_assign
|
||||
acl: jo_assign.list
|
||||
label: '[menu.joborder.assignment]'
|
||||
parent: joborder
|
||||
- id: jo_fulfill
|
||||
acl: jo_fulfill.list
|
||||
label: '[menu.joborder.fulfillment]'
|
||||
parent: joborder
|
||||
- id: jo_open
|
||||
acl: jo_open.list
|
||||
label: '[menu.joborder.open]'
|
||||
parent: joborder
|
||||
- id: jo_all
|
||||
acl: jo_all.list
|
||||
label: '[menu.joborder.viewall]'
|
||||
parent: joborder
|
||||
- id: jo_hub_view
|
||||
acl: jo_hub.list
|
||||
label: '[menu.joborder.hubview]'
|
||||
parent: joborder
|
||||
- id: jo_resq_all
|
||||
acl: jo_resq_all.list
|
||||
label: '[menu.joborder.resqall]'
|
||||
parent: joborder
|
||||
|
||||
- id: support
|
||||
acl: support.menu
|
||||
label: '[menu.support]'
|
||||
icon: flaticon-support
|
||||
order: 11
|
||||
- id: customer_list
|
||||
acl: customer.list
|
||||
label: '[menu.support.customers]'
|
||||
parent: support
|
||||
- id: ticket_list
|
||||
acl: ticket.list
|
||||
label: '[menu.support.tickets]'
|
||||
parent: support
|
||||
- id: general_search
|
||||
acl: general.search
|
||||
label: '[menu.support.search]'
|
||||
parent: support
|
||||
- id: warranty_search
|
||||
acl: warranty.search
|
||||
label: '[menu.support.warrantysearch]'
|
||||
parent: support
|
||||
- id: privacy_policy_list
|
||||
acl: privacy_policy.list
|
||||
label: '[menu.support.privacypolicy]'
|
||||
parent: support
|
||||
- id: warranty_list
|
||||
acl: warranty.list
|
||||
label: '[menu.support.warranty]'
|
||||
parent: support
|
||||
- id: warranty_upload
|
||||
acl: warranty.upload
|
||||
label: '[menu.support.warrantyupload]'
|
||||
parent: support
|
||||
- id: static_content_list
|
||||
acl: static_content.list
|
||||
label: '[menu.support.staticcontent]'
|
||||
parent: support
|
||||
- id: customertag_list
|
||||
acl: customer_tag.list
|
||||
label: '[menu.support.customertags]'
|
||||
parent: support
|
||||
- id: reviewtag_list
|
||||
acl: review_tag.list
|
||||
label: '[menu.support.reviewtags]'
|
||||
parent: support
|
||||
|
||||
- id: service
|
||||
acl: service.menu
|
||||
label: '[menu.service]'
|
||||
icon: flaticon-squares
|
||||
order: 12
|
||||
- id: service_list
|
||||
acl: service.list
|
||||
label: '[menu.service.services]'
|
||||
parent: service
|
||||
|
||||
- id: partner
|
||||
acl: partner.menu
|
||||
label: '[menu.partner]'
|
||||
icon: flaticon-network
|
||||
order: 13
|
||||
- id: partner_list
|
||||
acl: partner.list
|
||||
label: '[menu.partner.partners]'
|
||||
parent: partner
|
||||
- id: review_list
|
||||
acl: review.list
|
||||
label: '[menu.partner.reviews]'
|
||||
parent: partner
|
||||
|
||||
- id: motolite_event
|
||||
acl: motolite_event.menu
|
||||
label: '[menu.motolite_event]'
|
||||
icon: flaticon-event-calendar-symbol
|
||||
order: 14
|
||||
- id: motolite_event_list
|
||||
acl: motolite_event.list
|
||||
label: '[menu.motolite_event.events]'
|
||||
parent: motolite_event
|
||||
|
||||
- id: analytics
|
||||
acl: analytics.menu
|
||||
label: '[menu.analytics]'
|
||||
icon: flaticon-graphic
|
||||
order: 15
|
||||
- id: analytics_forecast_form
|
||||
acl: analytics.forecast
|
||||
label: '[menu.analytics.forecasting]'
|
||||
parent: analytics
|
||||
|
||||
- id: database
|
||||
acl: database.menu
|
||||
label: '[menu.database]'
|
||||
icon: fa fa-database
|
||||
order: 16
|
||||
- id: ticket_type_list
|
||||
acl: ticket_type.menu
|
||||
label: '[menu.database.tickettypes]'
|
||||
parent: database
|
||||
- id: subticket_type_list
|
||||
acl: subticket_type.menu
|
||||
label: '[menu.database.subtickettypes]'
|
||||
parent: database
|
||||
- id: emergency_type_list
|
||||
acl: emergency_type.menu
|
||||
label: '[menu.database.emergencytypes]'
|
||||
parent: database
|
||||
- id: ownership_type_list
|
||||
acl: ownership_type.menu
|
||||
label: '[menu.database.ownershiptypes]'
|
||||
parent: database
|
||||
- id: service_offering_list
|
||||
acl: service_offering.menu
|
||||
label: '[menu.database.serviceofferings]'
|
||||
parent: database
|
||||
- id: item_type_list
|
||||
acl: item_type.menu
|
||||
label: '[menu.database.itemtypes]'
|
||||
parent: database
|
||||
|
||||
- id: item
|
||||
acl: item.menu
|
||||
label: Item Management
|
||||
icon: fa fa-boxes
|
||||
order: 10
|
||||
- id: price_tier_list
|
||||
acl: price_tier.list
|
||||
label: Price Tiers
|
||||
parent: item
|
||||
- id: item_pricing
|
||||
acl: item_pricing.update
|
||||
label: Item Pricing
|
||||
parent: item
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!event"]
|
||||
# uncomment to get logging in your browser
|
||||
# you may have to allow bigger header sizes in your Web server configuration
|
||||
#firephp:
|
||||
# type: firephp
|
||||
# level: info
|
||||
#chromephp:
|
||||
# type: chromephp
|
||||
# level: info
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine", "!console"]
|
||||
|
|
@ -11,8 +11,6 @@ doctrine:
|
|||
driver: 'pdo_mysql'
|
||||
server_version: '5.7'
|
||||
charset: utf8mb4
|
||||
options:
|
||||
!php/const PDO::MYSQL_ATTR_LOCAL_INFILE: true
|
||||
|
||||
# With Symfony 3.3, remove the `resolve:` prefix
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
#monolog:
|
||||
# channels: [deprecation]
|
||||
# handlers:
|
||||
# deprecation:
|
||||
# type: stream
|
||||
# channels: [deprecation]
|
||||
# path: php://stderr
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||
nested:
|
||||
type: stream
|
||||
path: php://stderr
|
||||
level: debug
|
||||
formatter: monolog.formatter.json
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
|
||||
|
|
@ -9,24 +9,13 @@ security:
|
|||
entity:
|
||||
class: App\Entity\User
|
||||
property: username
|
||||
api_provider:
|
||||
entity:
|
||||
class: App\Entity\ApiUser
|
||||
property: api_key
|
||||
api_v2_provider:
|
||||
entity:
|
||||
class: App\Entity\CustomerUser
|
||||
property: api_key
|
||||
api_key_user_provider:
|
||||
id: Catalyst\APIBundle\Security\APIKeyUserProvider
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
|
||||
new_rider_api_login:
|
||||
pattern: ^\/rider_api\/login$
|
||||
methods: [POST]
|
||||
security: false
|
||||
|
||||
login:
|
||||
pattern: ^\/login$
|
||||
methods: [GET]
|
||||
|
|
@ -41,65 +30,17 @@ security:
|
|||
pattern: ^\/api\/
|
||||
security: false
|
||||
|
||||
sms:
|
||||
pattern: ^/sms\/
|
||||
security: false
|
||||
|
||||
rider_api:
|
||||
pattern: ^\/rapi\/
|
||||
security: false
|
||||
|
||||
test_capi:
|
||||
pattern: ^\/test_capi\/
|
||||
security: false
|
||||
|
||||
insurance:
|
||||
pattern: ^\/insurance\/
|
||||
security: false
|
||||
|
||||
paymongo:
|
||||
pattern: ^\/paymongo\/
|
||||
security: false
|
||||
|
||||
cust_api_v2:
|
||||
pattern: ^\/apiv2\/(?!register|register\/|number_confirm|number_confirm\/|code_validate|code_validate\/|resend_code|resend_code\/|version_check|version_check\/|account|account\/|account_code_validate|account_code_validate\/|account_resend_code|account_resend_code\/)
|
||||
provider: api_v2_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
cust_api_v2_guest:
|
||||
pattern: ^\/apiv2\/(register|register\/|number_confirm|number_confirm\/|code_validate|code_validate\/|resend_code|resend_code\/|version_check|version_check\/|account|account\/|account_code_validate|account_code_validate\/|account_resend_code|account_resend_code\/)
|
||||
security: false
|
||||
|
||||
warranty_api:
|
||||
pattern: ^\/capi\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
new_rider_api:
|
||||
pattern: ^\/rider_api\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
third_party_api:
|
||||
pattern: ^\/tapi\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
simple_preauth:
|
||||
authenticator: Catalyst\APIBundle\Security\APIKeyAuthenticator
|
||||
provider: api_key_user_provider
|
||||
user_checker: Catalyst\AuthBundle\Service\UserChecker
|
||||
|
||||
main:
|
||||
provider: user_provider
|
||||
|
|
@ -114,7 +55,6 @@ security:
|
|||
lifetime: 604800
|
||||
path: /
|
||||
user_checker: Catalyst\AuthBundle\Service\UserChecker
|
||||
switch_user: { role: ROLE_SUPER_ADMIN }
|
||||
|
||||
# activate different ways to authenticate
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
channels: ["!event"]
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
|
||||
|
|
@ -4,8 +4,5 @@ twig:
|
|||
strict_variables: '%kernel.debug%'
|
||||
globals:
|
||||
gmaps_api_key: "%env(GMAPS_API_KEY)%"
|
||||
maptiler_api_key: "%env(MAPTILER_API_KEY)%"
|
||||
mqtt_host: "%env(MQTT_WS_HOST)%"
|
||||
mqtt_port: "%env(MQTT_WS_PORT)%"
|
||||
dashboard_enable: "%env(DASHBOARD_ENABLE)%"
|
||||
ssl_enable: "%env(SSL_ENABLE)%"
|
||||
|
|
|
|||
|
|
@ -1,186 +0,0 @@
|
|||
main_menu:
|
||||
- id: home
|
||||
acl: dashboard.menu
|
||||
label: Dashboard
|
||||
icon: flaticon-line-graph
|
||||
- id: user
|
||||
acl: user.menu
|
||||
label: User
|
||||
icon: flaticon-users
|
||||
- id: user_list
|
||||
acl: user.list
|
||||
label: Users
|
||||
parent: user
|
||||
- id: role_list
|
||||
acl: role.list
|
||||
label: Roles
|
||||
parent: user
|
||||
|
||||
- id: apiuser
|
||||
acl: apiuser.menu
|
||||
label: API User
|
||||
icon: flaticon-users
|
||||
- id: api_user_list
|
||||
acl: apiuser.list
|
||||
label: API Users
|
||||
parent: apiuser
|
||||
- id: api_role_list
|
||||
acl: apirole.list
|
||||
label: API Roles
|
||||
parent: apiuser
|
||||
|
||||
- id: logistics
|
||||
acl: logistics.menu
|
||||
label: Logistics
|
||||
icon: fa fa-truck
|
||||
- id: rider_list
|
||||
acl: rider.list
|
||||
label: Riders
|
||||
parent: logistics
|
||||
|
||||
- id: battery
|
||||
acl: battery.menu
|
||||
label: Battery
|
||||
icon: fa fa-battery-3
|
||||
- id: battery_list
|
||||
acl: battery.list
|
||||
label: Batteries
|
||||
parent: battery
|
||||
- id: bmfg_list
|
||||
acl: bmfg.list
|
||||
label: Manufacturers
|
||||
parent: battery
|
||||
- id: bmodel_list
|
||||
acl: bmodel.list
|
||||
label: Models
|
||||
parent: battery
|
||||
- id: bsize_list
|
||||
acl: bsize.list
|
||||
label: Sizes
|
||||
parent: battery
|
||||
- id: promo_list
|
||||
acl: promo.list
|
||||
label: Promos
|
||||
parent: battery
|
||||
|
||||
- id: vehicle
|
||||
acl: vehicle.menu
|
||||
label: Vehicle
|
||||
icon: fa fa-car
|
||||
- id: vehicle_list
|
||||
acl: vehicle.list
|
||||
label: Vehicles
|
||||
parent: vehicle
|
||||
- id: vmfg_list
|
||||
acl: vmfg.list
|
||||
label: Manufacturers
|
||||
parent: vehicle
|
||||
|
||||
- id: location
|
||||
acl: location.menu
|
||||
label: Location
|
||||
icon: fa fa-home
|
||||
- id: outlet_list
|
||||
acl: outlet.menu
|
||||
label: Outlet
|
||||
parent: location
|
||||
- id: hub_list
|
||||
acl: hub.menu
|
||||
label: Hub
|
||||
parent: location
|
||||
- id: geofence_list
|
||||
acl: geofence.menu
|
||||
label: Geofence
|
||||
parent: location
|
||||
|
||||
|
||||
- id: joborder
|
||||
acl: joborder.menu
|
||||
label: Job Order
|
||||
icon: flaticon-calendar-3
|
||||
- id: jo_in
|
||||
acl: jo_in.list
|
||||
label: Incoming
|
||||
parent: joborder
|
||||
- id: jo_proc
|
||||
acl: jo_proc.list
|
||||
label: Dispatch
|
||||
parent: joborder
|
||||
- id: jo_assign
|
||||
acl: jo_assign.list
|
||||
label: Rider Assignment
|
||||
parent: joborder
|
||||
- id: jo_fulfill
|
||||
acl: jo_fulfill.list
|
||||
label: Fulfillment
|
||||
parent: joborder
|
||||
- id: jo_open
|
||||
acl: jo_open.list
|
||||
label: Open
|
||||
parent: joborder
|
||||
- id: jo_all
|
||||
acl: jo_all.list
|
||||
label: View All
|
||||
parent: joborder
|
||||
- id: jo_hub.view
|
||||
label: Hub View
|
||||
parent: joborder
|
||||
|
||||
- id: support
|
||||
acl: support.menu
|
||||
label: Customer Support
|
||||
icon: flaticon-support
|
||||
- id: customer_list
|
||||
acl: customer.list
|
||||
label: Customers
|
||||
parent: support
|
||||
- id: ticket_list
|
||||
acl: ticket.list
|
||||
label: Tickets
|
||||
parent: support
|
||||
- id: general_search
|
||||
acl: general.search
|
||||
label: Search
|
||||
parent: support
|
||||
- id: warranty_search
|
||||
acl: warranty.search
|
||||
label: Customer Battery Search
|
||||
parent: support
|
||||
- id: privacy_policy_list
|
||||
acl: privacy_policy.list
|
||||
label: Privacy Policy
|
||||
parent: support
|
||||
- id: warranty_list
|
||||
acl: warranty.list
|
||||
label: Warranty
|
||||
parent: support
|
||||
- id: warranty_upload
|
||||
acl: warranty.upload
|
||||
label: Warranty Upload
|
||||
parent: support
|
||||
- id: static_content_list
|
||||
acl: static_content.list
|
||||
label: Static Content
|
||||
parent: support
|
||||
|
||||
- id: service
|
||||
acl: service.menu
|
||||
label: Other Services
|
||||
icon: flaticon-squares
|
||||
- id: service_list
|
||||
acl: service.list
|
||||
label: Services
|
||||
parent: service
|
||||
|
||||
- id: partner
|
||||
acl: partner.menu
|
||||
label: Partners
|
||||
icon: flaticon-network
|
||||
- id: partner_list
|
||||
acl: partner.list
|
||||
label: Partners
|
||||
parent: partner
|
||||
- id: review_list
|
||||
acl: review.list
|
||||
label: Reviews
|
||||
parent: partner
|
||||
|
|
@ -12,7 +12,6 @@ parameters:
|
|||
app_access_key: 'access_keys'
|
||||
cvu_brand_id: "%env(CVU_BRAND_ID)%"
|
||||
country_code: "%env(COUNTRY_CODE)%"
|
||||
api_version: "%env(API_VERSION)%"
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
|
|
@ -43,6 +42,20 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -51,7 +64,6 @@ services:
|
|||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$gmaps_api_key: "%env(GMAPS_API_KEY)%"
|
||||
$cust_dist_limit: "%env(CUST_DISTANCE_LIMIT)%"
|
||||
|
||||
App\Service\RisingTideGateway:
|
||||
arguments:
|
||||
|
|
@ -101,6 +113,50 @@ services:
|
|||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\ResqInvoiceGenerator: ~
|
||||
|
||||
|
|
@ -170,16 +226,3 @@ services:
|
|||
$redis_prov: "@App\\Service\\RedisClientProvider"
|
||||
$loc_key: "%env(LOCATION_RIDER_ACTIVE_KEY)%"
|
||||
$status_key: "%env(STATUS_RIDER_KEY)%"
|
||||
|
||||
# inventory manager
|
||||
App\Service\InventoryManager:
|
||||
arguments:
|
||||
$api_url: "%env(INVENTORY_API_URL)%"
|
||||
$api_ocp_key: "%env(INVENTORY_API_OCP)%"
|
||||
$api_auth_prefix: "%env(INVENTORY_API_AUTH_TOKEN_PREFIX)%"
|
||||
$api_auth_token: "%env(INVENTORY_API_AUTH_TOKEN)%"
|
||||
|
||||
# API logging
|
||||
App\EventSubscriber\LogSubscriber:
|
||||
arguments:
|
||||
$api_log_flag: "%env(API_LOGGING)%"
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
# analytics
|
||||
|
||||
analytics_forecast_form:
|
||||
path: /analytics/forecast
|
||||
controller: App\Controller\AnalyticsController::forecastForm
|
||||
methods: [GET]
|
||||
|
||||
analytics_forecast_submit:
|
||||
path: /analytics/forecast
|
||||
controller: App\Controller\AnalyticsController::forecastSubmit
|
||||
methods: [POST]
|
||||
|
|
@ -149,79 +149,3 @@ api_partner_review:
|
|||
path: /api/partners/{pid}/review
|
||||
controller: App\Controller\APIController:reviewPartner
|
||||
methods: [POST]
|
||||
|
||||
api_nearest_hub_slots:
|
||||
path: /api/hub_slots
|
||||
controller: App\Controller\APIController::getNearestHubAndSlots
|
||||
methods: [GET]
|
||||
|
||||
api_new_jo_request:
|
||||
path: /api/new_job_order
|
||||
controller: App\Controller\APIController::newRequestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
api_version_check:
|
||||
path: /api/version_check
|
||||
controller: App\Controller\APIController::versionCheck
|
||||
methods: [GET]
|
||||
|
||||
api_schedule_option_status:
|
||||
path: /api/schedule_option_status
|
||||
controller: App\Controller\APIController::scheduleOptionStatus
|
||||
methods: [GET]
|
||||
|
||||
# paperless warranty / qr code
|
||||
api_warr_serial_check:
|
||||
path: /api/warranty/{serial}
|
||||
controller: App\Controller\APIController::warrantyCheck
|
||||
methods: [GET]
|
||||
|
||||
api_warr_serial_register:
|
||||
path: /api/warranty/{serial}
|
||||
controller: App\Controller\APIController::warrantyRegister
|
||||
methods: [POST]
|
||||
|
||||
api_jo_info:
|
||||
path: /api/job_order/{id}/info
|
||||
controller: App\Controller\APIController::getJobOrderInfo
|
||||
methods: [GET]
|
||||
|
||||
api_ongoing_job_orders:
|
||||
path: /api/job_orders/ongoing
|
||||
controller: App\Controller\APIController::getAllOngoingJobOrders
|
||||
methods: [GET]
|
||||
|
||||
api_ongoing_jo_count:
|
||||
path: /api/job_orders/ongoing/count
|
||||
controller: App\Controller\APIController::getOngoingJobOrderCount
|
||||
methods: [GET]
|
||||
|
||||
api_new_location:
|
||||
path: /api/new_location
|
||||
controller: App\Controller\APIController::addLocation
|
||||
methods: [POST]
|
||||
|
||||
api_locations:
|
||||
path: /api/locations
|
||||
controller: App\Controller\APIController::getLocations
|
||||
methods: [GET]
|
||||
|
||||
api_cust_vehicle_remove:
|
||||
path: /api/vehicles/{id}/remove
|
||||
controller: App\Controller\APIController::removeVehicle
|
||||
methods: [POST]
|
||||
|
||||
api_latest_job_order:
|
||||
path: /api/job_order/latest
|
||||
controller: App\Controller\APIController::getLatestJobOrder
|
||||
methods: [GET]
|
||||
|
||||
api_customer_hash_get:
|
||||
path: /api/customer_hash
|
||||
controller: App\Controller\APIController::getCustomerHash
|
||||
methods: [GET]
|
||||
|
||||
#api_completed_job_orders:
|
||||
# path: /api/job_orders/completed
|
||||
# controller: App\Controller\APIController::getCompletedJobOrders
|
||||
# methods: [GET]
|
||||
|
|
|
|||
|
|
@ -1,315 +0,0 @@
|
|||
# api
|
||||
|
||||
apiv2_register:
|
||||
path: /apiv2/register
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::register
|
||||
methods: [POST]
|
||||
|
||||
apiv2_confirm:
|
||||
path: /apiv2/number_confirm
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::confirmNumber
|
||||
methods: [POST]
|
||||
|
||||
apiv2_validate:
|
||||
path: /apiv2/code_validate
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::validateCode
|
||||
methods: [POST]
|
||||
|
||||
apiv2_info_get:
|
||||
path: /apiv2/info
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getInfo
|
||||
methods: [GET]
|
||||
|
||||
apiv2_info_update:
|
||||
path: /apiv2/info
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::updateInfo
|
||||
methods: [POST]
|
||||
|
||||
apiv2_status:
|
||||
path: /apiv2/status
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getStatus
|
||||
methods: [GET]
|
||||
|
||||
apiv2_vehicle_mfg_list:
|
||||
path: /apiv2/vehicle/mfgs
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicleManufacturers
|
||||
methods: [GET]
|
||||
|
||||
apiv2_vehicle_make_list:
|
||||
path: /apiv2/vehicle/mfgs/{mfg_id}/makes
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicleMakes
|
||||
methods: [GET]
|
||||
|
||||
apiv2_cust_vehicle_add:
|
||||
path: /apiv2/vehicles
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::addVehicle
|
||||
methods: [POST]
|
||||
|
||||
apiv2_cust_vehicle_info:
|
||||
path: /apiv2/vehicles/{id}
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::getVehicle
|
||||
methods: [GET]
|
||||
|
||||
apiv2_cust_vehicle_update:
|
||||
path: /apiv2/vehicles/{id}
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::updateVehicle
|
||||
methods: [POST]
|
||||
|
||||
apiv2_cust_vehicle_list:
|
||||
path: /apiv2/vehicles
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicles
|
||||
methods: [GET]
|
||||
|
||||
apiv2_promo_list:
|
||||
path: /apiv2/promos
|
||||
controller: App\Controller\CustomerAppAPI\PromoController::listPromos
|
||||
methods: [GET]
|
||||
|
||||
apiv2_battery_list:
|
||||
path: /apiv2/vehicles/{vid}/compatible_batteries
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::getCompatibleBatteries
|
||||
methods: [GET]
|
||||
|
||||
apiv2_jo_request:
|
||||
path: /apiv2/job_order
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::requestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
apiv2_estimate:
|
||||
path: /apiv2/estimate
|
||||
controller: App\Controller\CustomerAppAPI\InvoiceController::getEstimate
|
||||
methods: [POST]
|
||||
|
||||
apiv2_ongoing:
|
||||
path: /apiv2/job_order/ongoing
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getOngoing
|
||||
methods: [GET]
|
||||
|
||||
apiv2_rider_status:
|
||||
path: /apiv2/rider
|
||||
controller: App\Controller\CustomerAppAPI\RiderController::getRiderStatus
|
||||
methods: [GET]
|
||||
|
||||
apiv2_rider_rating_add:
|
||||
path: /apiv2/rider_rating
|
||||
controller: App\Controller\CustomerAppAPI\RiderController::addRiderRating
|
||||
methods: [POST]
|
||||
|
||||
apiv2_jo_cancel:
|
||||
path: /apiv2/job_order/cancel
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:cancelJobOrder
|
||||
methods: [POST]
|
||||
|
||||
apiv2_jo_history:
|
||||
path: /apiv2/job_order/history
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:getJOHistory
|
||||
methods: [GET]
|
||||
|
||||
apiv2_jo_invoice:
|
||||
path: /apiv2/job_order/invoice
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:getJOInvoice
|
||||
methods: [GET]
|
||||
|
||||
apiv2_device_id:
|
||||
path: /apiv2/device_id
|
||||
controller: App\Controller\CustomerAppAPI\DeviceController:updateDeviceID
|
||||
methods: [POST]
|
||||
|
||||
apiv2_privacy:
|
||||
path: /apiv2/privacy
|
||||
controller: App\Controller\CustomerAppAPI\PrivacyController:privacySettings
|
||||
methods: [POST]
|
||||
|
||||
apiv2_resend_code:
|
||||
path: /apiv2/resend_code
|
||||
controller: App\Controller\CustomerAppAPI\AuthController:resendCode
|
||||
methods: [POST]
|
||||
|
||||
apiv2_location_support:
|
||||
path: /apiv2/location_support
|
||||
controller: App\Controller\CustomerAppAPI\LocationController:locationSupport
|
||||
methods: [GET]
|
||||
|
||||
apiv2_activate_warranty:
|
||||
path: /apiv2/activate_warranty
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController:activateWarranty
|
||||
methods: [POST]
|
||||
|
||||
apiv2_service_list:
|
||||
path: /apiv2/services
|
||||
controller: App\Controller\CustomerAppAPI\ServiceController:listServices
|
||||
methods: [GET]
|
||||
|
||||
apiv2_partner_info:
|
||||
path: /apiv2/partners/{pid}
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:getPartnerInformation
|
||||
methods: [GET]
|
||||
|
||||
apiv2_partner:
|
||||
path: /apiv2/partners
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:getClosestPartners
|
||||
methods: [GET]
|
||||
|
||||
apiv2_partner_review:
|
||||
path: /apiv2/partners/{pid}/review
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:reviewPartner
|
||||
methods: [POST]
|
||||
|
||||
apiv2_nearest_hub_slots:
|
||||
path: /apiv2/hub_slots
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::getNearestHubAndSlots
|
||||
methods: [GET]
|
||||
|
||||
apiv2_new_jo_request:
|
||||
path: /apiv2/new_job_order
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::newRequestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
apiv2_version_check:
|
||||
path: /apiv2/version_check
|
||||
controller: App\Controller\CustomerAppAPI\AppController::versionCheck
|
||||
methods: [GET]
|
||||
|
||||
apiv2_schedule_option_status:
|
||||
path: /apiv2/schedule_option_status
|
||||
controller: App\Controller\CustomerAppAPI\ScheduleController::scheduleOptionStatus
|
||||
methods: [GET]
|
||||
|
||||
# paperless warranty / qr code
|
||||
apiv2_warr_serial_check:
|
||||
path: /apiv2/warranty/{serial}
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController::warrantyCheck
|
||||
methods: [GET]
|
||||
|
||||
apiv2_warr_serial_register:
|
||||
path: /apiv2/warranty/{serial}
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController::warrantyRegister
|
||||
methods: [POST]
|
||||
|
||||
apiv2_jo_info:
|
||||
path: /apiv2/job_order/{id}/info
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getJobOrderInfo
|
||||
methods: [GET]
|
||||
|
||||
apiv2_ongoing_job_orders:
|
||||
path: /apiv2/job_orders/ongoing
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getAllOngoingJobOrders
|
||||
methods: [GET]
|
||||
|
||||
apiv2_ongoing_jo_count:
|
||||
path: /apiv2/job_orders/ongoing/count
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getOngoingJobOrderCount
|
||||
methods: [GET]
|
||||
|
||||
apiv2_new_location:
|
||||
path: /apiv2/new_location
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::addLocation
|
||||
methods: [POST]
|
||||
|
||||
apiv2_locations:
|
||||
path: /apiv2/locations
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::getLocations
|
||||
methods: [GET]
|
||||
|
||||
apiv2_location_remove:
|
||||
path: /apiv2/locations/{id}/remove
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::removeLocation
|
||||
methods: [POST]
|
||||
|
||||
apiv2_cust_vehicle_remove:
|
||||
path: /apiv2/vehicles/{id}/remove
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::removeVehicle
|
||||
methods: [POST]
|
||||
|
||||
apiv2_latest_job_order:
|
||||
path: /apiv2/job_order/latest
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getLatestJobOrder
|
||||
methods: [GET]
|
||||
|
||||
apiv2_customer_hash_get:
|
||||
path: /apiv2/customer_hash
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getCustomerHash
|
||||
methods: [GET]
|
||||
|
||||
#apiv2_completed_job_orders:
|
||||
# path: /apiv2/job_orders/completed
|
||||
# controller: App\Controller\CustomerAppAPI\JobOrderController::getCompletedJobOrders
|
||||
# methods: [GET]
|
||||
|
||||
# motolite events
|
||||
apiv2_motolite_events:
|
||||
path: /apiv2/motolite_events
|
||||
controller: App\Controller\CustomerAppAPI\MotoliteEventController::getEvents
|
||||
methods: [GET]
|
||||
|
||||
# review tags
|
||||
apiv2_partner_review_tags:
|
||||
path: /apiv2/review_tags/partner
|
||||
controller: App\Controller\CustomerAppAPI\ReviewTagController::getPartnerReviewTags
|
||||
|
||||
apiv2_rider_review_tags:
|
||||
path: /apiv2/review_tags/rider
|
||||
controller: App\Controller\CustomerAppAPI\ReviewTagController::getRiderReviewTags
|
||||
|
||||
# account deletion
|
||||
apiv2_account_delete:
|
||||
path: /apiv2/account_delete
|
||||
controller: App\Controller\CustomerAppAPI\AccountController::deleteAccount
|
||||
methods: [POST]
|
||||
|
||||
apiv2_account_delete_resend_code:
|
||||
path: /apiv2/account_delete_resend_code
|
||||
controller: App\Controller\CustomerAppAPI\AccountController:resendCode
|
||||
methods: [POST]
|
||||
|
||||
apiv2_account_delete_code_validate:
|
||||
path: /apiv2/account_delete_code_validate
|
||||
controller: App\Controller\CustomerAppAPI\AccountController::validateDeleteCode
|
||||
methods: [POST]
|
||||
|
||||
# trade-in support
|
||||
apiv2_cust_vehicle_trade_in_estimate:
|
||||
path: /apiv2/vehicles/{id}/trade_in_estimate
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::getTradeInEstimate
|
||||
methods: [GET]
|
||||
|
||||
# insurance
|
||||
apiv2_insurance_vehicle_maker_list:
|
||||
path: /apiv2/insurance/vehicles/makers
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getVehicleMakers
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_vehicle_model_list:
|
||||
path: /apiv2/insurance/vehicles/models/{maker_id}
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getVehicleModels
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_vehicle_trim_list:
|
||||
path: /apiv2/insurance/vehicles/trims/{model_id}
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getVehicleTrims
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_vehicle_mv_type_list:
|
||||
path: /apiv2/insurance/mvtypes
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getMVTypes
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_vehicle_client_type_list:
|
||||
path: /apiv2/insurance/clienttypes
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getClientTypes
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_application_create:
|
||||
path: /apiv2/insurance/application
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::createApplication
|
||||
methods: [POST]
|
||||
|
||||
apiv2_insurance_premiums_banner:
|
||||
path: /apiv2/insurance/premiums_banner
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getPremiumsBanner
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_body_types:
|
||||
path: /apiv2/insurance/body_types
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getBodyTypes
|
||||
methods: [GET]
|
||||
|
|
@ -3,10 +3,6 @@ capi_test:
|
|||
path: /capi/test
|
||||
controller: App\Controller\CAPI\TestController::test
|
||||
|
||||
capi_test_warranty_serial:
|
||||
path: /test_capi/test/warranty_serial
|
||||
controller: App\Controller\CAPI\TestController::warrantySerial
|
||||
|
||||
|
||||
# battery api
|
||||
|
||||
|
|
@ -53,11 +49,6 @@ capi_vehicle_list:
|
|||
controller: App\Controller\CAPI\VehicleController::list
|
||||
methods: [GET]
|
||||
|
||||
capi_vehicle_by_mfg:
|
||||
path: /capi/vehicle_manufacturer/{mfg_id}
|
||||
controller: App\Controller\CAPI\VehicleController::getByManufacturer
|
||||
methods: [GET]
|
||||
|
||||
|
||||
# plate api
|
||||
|
||||
|
|
@ -117,12 +108,6 @@ capi_warranty_privacy_policy:
|
|||
controller: App\Controller\CAPI\WarrantyController::setPrivacyPolicy
|
||||
methods: [POST]
|
||||
|
||||
# get list of warranties given list of serials
|
||||
capi_warranty_get_warranties_from_serials:
|
||||
path: /capi/warranties_list
|
||||
controller: App\Controller\CAPI\WarrantyController::getWarrantiesBySerialList
|
||||
methods: [POST]
|
||||
|
||||
# customer vehicle api
|
||||
|
||||
# find customer vehicle by id
|
||||
|
|
@ -158,52 +143,3 @@ capi_customer_register:
|
|||
path: /capi/quick_registration
|
||||
controller: App\Controller\CAPI\CustomerController::register
|
||||
methods: [POST]
|
||||
|
||||
# verify if resq customer
|
||||
capi_customer_verify:
|
||||
path: /capi/customer/{customer_hash}
|
||||
controller: App\Controller\CAPI\CustomerController::verifyCustomer
|
||||
methods: [GET]
|
||||
|
||||
# customer warranty api
|
||||
capi_cwarr_check:
|
||||
path: /capi/customer_warranty/{serial}
|
||||
controller: App\Controller\CAPI\CustomerWarrantyController::check
|
||||
methods: [GET]
|
||||
|
||||
capi_cwarr_register:
|
||||
path: /capi/customer_warranty/{serial}
|
||||
controller: App\Controller\CAPI\CustomerWarrantyController::register
|
||||
methods: [POST]
|
||||
|
||||
|
||||
# municipality
|
||||
capi_municipality_list:
|
||||
path: /capi/municipality
|
||||
controller: App\Controller\CAPI\MunicipalityController::getAll
|
||||
methods: [GET]
|
||||
|
||||
# dealer
|
||||
capi_dealer_list:
|
||||
path: /capi/dealers
|
||||
controller: App\Controller\CAPI\DealerController::getAll
|
||||
methods: [GET]
|
||||
|
||||
# warranty serial api
|
||||
capi_warranty_serial_upload:
|
||||
path: /capi/warranty_serial/upload
|
||||
controller: App\Controller\CAPI\WarrantySerialController::uploadWarrantySerialFile
|
||||
methods: [POST]
|
||||
|
||||
# pullout form system
|
||||
# hub
|
||||
capi_hub_list:
|
||||
path: /capi/hubs
|
||||
controller: App\Controller\CAPI\HubController::getAll
|
||||
methods: [GET]
|
||||
|
||||
# job order details
|
||||
capi_job_order:
|
||||
path: /capi/job_order/{id}
|
||||
controller: App\Controller\CAPI\JobOrderController::getJobOrder
|
||||
methods: [GET]
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
# rider app api
|
||||
|
||||
capi_rider_register:
|
||||
path: /rider_api/register
|
||||
controller: App\Controller\CAPI\RiderAppController::register
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_login:
|
||||
path: /rider_api/login
|
||||
controller: App\Controller\CAPI\RiderAppController::login
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_logout:
|
||||
path: /rider_api/logout
|
||||
controller: App\Controller\CAPI\RiderAppController::logout
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_jo_get:
|
||||
path: /rider_api/joborder
|
||||
controller: App\Controller\CAPI\RiderAppController::getJobOrder
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_jo_accept:
|
||||
path: /rider_api/accept
|
||||
controller: App\Controller\CAPI\RiderAppController::acceptJobOrder
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_jo_cancel:
|
||||
path: /rider_api/cancel
|
||||
controller: App\Controller\CAPI\RiderAppController::cancelJobOrder
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_arrive:
|
||||
path: /rider_api/arrive
|
||||
controller: App\Controller\CAPI\RiderAppController::arrive
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_payment:
|
||||
path: /rider_api/payment
|
||||
controller: App\Controller\CAPI\RiderAppController::payment
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_hub_arrive:
|
||||
path: /rider_api/hub_arrive
|
||||
controller: App\Controller\CAPI\RiderAppController::hubArrive
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_promos:
|
||||
path: /rider_api/promos
|
||||
controller: App\Controller\CAPI\RiderAppController::getPromos
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_batteries:
|
||||
path: /rider_api/batteries
|
||||
controller: App\Controller\CAPI\RiderAppController::getBatteries
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_change_service:
|
||||
path: /rider_api/service
|
||||
controller: App\Controller\CAPI\RiderAppController::changeService
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_available:
|
||||
path: /rider_api/available
|
||||
controller: App\Controller\CAPI\RiderAppController::available
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_hub_depart:
|
||||
path: /rider_api/hub_depart
|
||||
controller: App\Controller\CAPI\RiderAppController::hubDepart
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_pre_hub_depart:
|
||||
path: /rider_api/pre_hub_depart
|
||||
controller: App\Controller\CAPI\RiderAppController::preHubDepart
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_pre_hub_arrive:
|
||||
path: /rider_api/pre_hub_arrive
|
||||
controller: App\Controller\CAPI\RiderAppController::preHubArrive
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_post_hub_depart:
|
||||
path: /rider_api/post_hub_depart
|
||||
controller: App\Controller\CAPI\RiderAppController::postHubDepart
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_post_hub_arrive:
|
||||
path: /rider_api/post_hub_arrive
|
||||
controller: App\Controller\CAPI\RiderAppController::postHubArrive
|
||||
methods: [POST]
|
||||
|
||||
capi_rider_jo_start:
|
||||
path: /rider_api/start
|
||||
controller: App\Controller\CAPI\RiderAppController::startJobOrder
|
||||
methods: [POST]
|
||||
|
||||
# trade-ins
|
||||
capi_rider_battery_sizes:
|
||||
path: /rider_api/battery_sizes
|
||||
controller: App\Controller\CAPI\RiderAppController::getBatterySizes
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_trade_in_types:
|
||||
path: /rider_api/trade_in_types
|
||||
controller: App\Controller\CAPI\RiderAppController::getTradeInTypes
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_battery_info:
|
||||
path: /rider_api/battery/{serial}
|
||||
controller: App\Controller\CAPI\RiderAppController::getBatteryInfo
|
||||
methods: [GET]
|
||||
|
||||
capi_rider_update_jo:
|
||||
path: /rider_api/job_order/update
|
||||
controller: App\Controller\CAPI\RiderAppController::updateJobOrder
|
||||
methods: [POST]
|
||||
|
|
@ -5,7 +5,7 @@ customer_list:
|
|||
customer_rows:
|
||||
path: /customers/rows
|
||||
controller: App\Controller\CustomerController::rows
|
||||
methods: [GET,POST]
|
||||
methods: [POST]
|
||||
|
||||
customer_vehicle_search:
|
||||
path: /customers/vehicles
|
||||
|
|
@ -44,8 +44,3 @@ customer_delete:
|
|||
path: /customers/{id}
|
||||
controller: App\Controller\CustomerController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
customer_vehicle_warranty_edit_ajax:
|
||||
path: /ajax/customer_vehicle/{id}
|
||||
controller: App\Controller\CustomerController::editCustomerVehicleWarranty
|
||||
methods: [POST]
|
||||
|
|
|
|||
|
|
@ -1,227 +0,0 @@
|
|||
# api
|
||||
|
||||
cust_api_register:
|
||||
path: /apiv2/register
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::register
|
||||
methods: [POST]
|
||||
|
||||
cust_api_confirm:
|
||||
path: /apiv2/number_confirm
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::confirmNumber
|
||||
methods: [POST]
|
||||
|
||||
cust_api_validate:
|
||||
path: /apiv2/code_validate
|
||||
controller: App\Controller\CustomerAppAPI\AuthController::validateCode
|
||||
methods: [POST]
|
||||
|
||||
cust_api_info_get:
|
||||
path: /apiv2/info
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getInfo
|
||||
methods: [GET]
|
||||
|
||||
cust_api_info_update:
|
||||
path: /apiv2/info
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::updateInfo
|
||||
methods: [POST]
|
||||
|
||||
cust_api_status:
|
||||
path: /apiv2/status
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getStatus
|
||||
methods: [GET]
|
||||
|
||||
cust_api_vehicle_mfg_list:
|
||||
path: /apiv2/vehicle/mfgs
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicleManufacturers
|
||||
methods: [GET]
|
||||
|
||||
cust_api_vehicle_make_list:
|
||||
path: /apiv2/vehicle/mfgs/{mfg_id}/makes
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicleMakes
|
||||
methods: [GET]
|
||||
|
||||
cust_api_cust_vehicle_add:
|
||||
path: /apiv2/vehicles
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::addVehicle
|
||||
methods: [POST]
|
||||
|
||||
cust_api_cust_vehicle_update:
|
||||
path: /apiv2/vehicles/{id}
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::updateVehicle
|
||||
methods: [POST]
|
||||
|
||||
cust_api_cust_vehicle_list:
|
||||
path: /apiv2/vehicles
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::listVehicles
|
||||
methods: [GET]
|
||||
|
||||
cust_api_promo_list:
|
||||
path: /apiv2/promos
|
||||
controller: App\Controller\CustomerAppAPI\PromoController::listPromos
|
||||
methods: [GET]
|
||||
|
||||
cust_api_battery_list:
|
||||
path: /apiv2/vehicles/{vid}/compatible_batteries
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::getCompatibleBatteries
|
||||
methods: [GET]
|
||||
|
||||
cust_api_jo_request:
|
||||
path: /apiv2/job_order
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::requestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
cust_api_estimate:
|
||||
path: /apiv2/estimate
|
||||
controller: App\Controller\CustomerAppAPI\EstimateController::getEstimate
|
||||
methods: [POST]
|
||||
|
||||
cust_api_ongoing:
|
||||
path: /apiv2/job_order/ongoing
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getOngoing
|
||||
methods: [GET]
|
||||
|
||||
cust_api_rider_status:
|
||||
path: /apiv2/rider
|
||||
controller: App\Controller\CustomerAppAPI\RiderController::getRiderStatus
|
||||
methods: [GET]
|
||||
|
||||
cust_api_rider_rating_add:
|
||||
path: /apiv2/rider_rating
|
||||
controller: App\Controller\CustomerAppAPI\RiderController::addRiderRating
|
||||
methods: [POST]
|
||||
|
||||
cust_api_jo_cancel:
|
||||
path: /apiv2/job_order/cancel
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:cancelJobOrder
|
||||
methods: [POST]
|
||||
|
||||
cust_api_jo_history:
|
||||
path: /apiv2/job_order/history
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:getJOHistory
|
||||
methods: [GET]
|
||||
|
||||
cust_api_jo_invoice:
|
||||
path: /apiv2/job_order/invoice
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController:getJOInvoice
|
||||
methods: [GET]
|
||||
|
||||
cust_api_device_id:
|
||||
path: /apiv2/device_id
|
||||
controller: App\Controller\CustomerAppAPI\DeviceController:updateDeviceID
|
||||
methods: [POST]
|
||||
|
||||
cust_api_privacy:
|
||||
path: /apiv2/privacy
|
||||
controller: App\Controller\CustomerAppAPI\PrivacyController:privacySettings
|
||||
methods: [POST]
|
||||
|
||||
cust_api_resend_code:
|
||||
path: /apiv2/resend_code
|
||||
controller: App\Controller\CustomerAppAPI\AuthController:resendCode
|
||||
methods: [POST]
|
||||
|
||||
cust_api_location_support:
|
||||
path: /apiv2/location_support
|
||||
controller: App\Controller\CustomerAppAPI\LocationController:locationSupport
|
||||
methods: [GET]
|
||||
|
||||
cust_api_activate_warranty:
|
||||
path: /apiv2/activate_warranty
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController:activateWarranty
|
||||
methods: [POST]
|
||||
|
||||
cust_api_service_list:
|
||||
path: /apiv2/services
|
||||
controller: App\Controller\CustomerAppAPI\ServiceController:listServices
|
||||
methods: [GET]
|
||||
|
||||
cust_api_partner_info:
|
||||
path: /apiv2/partners/{pid}
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:getPartnerInformation
|
||||
methods: [GET]
|
||||
|
||||
cust_api_partner:
|
||||
path: /apiv2/partners
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:getClosestPartners
|
||||
methods: [GET]
|
||||
|
||||
cust_api_partner_review:
|
||||
path: /apiv2/partners/{pid}/review
|
||||
controller: App\Controller\CustomerAppAPI\PartnerController:reviewPartner
|
||||
methods: [POST]
|
||||
|
||||
cust_api_nearest_hub_slots:
|
||||
path: /apiv2/hub_slots
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::getNearestHubAndSlots
|
||||
methods: [GET]
|
||||
|
||||
cust_api_new_jo_request:
|
||||
path: /apiv2/new_job_order
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::newRequestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
cust_api_version_check:
|
||||
path: /apiv2/version_check
|
||||
controller: App\Controller\CustomerAppAPI\AppController::versionCheck
|
||||
methods: [GET]
|
||||
|
||||
cust_api_schedule_option_status:
|
||||
path: /apiv2/schedule_option_status
|
||||
controller: App\Controller\CustomerAppAPI\ScheduleController::scheduleOptionStatus
|
||||
methods: [GET]
|
||||
|
||||
# paperless warranty / qr code
|
||||
cust_api_warr_serial_check:
|
||||
path: /apiv2/warranty/{serial}
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController::warrantyCheck
|
||||
methods: [GET]
|
||||
|
||||
cust_api_warr_serial_register:
|
||||
path: /apiv2/warranty/{serial}
|
||||
controller: App\Controller\CustomerAppAPI\WarrantyController::warrantyRegister
|
||||
methods: [POST]
|
||||
|
||||
cust_api_jo_info:
|
||||
path: /apiv2/job_order/{id}/info
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getJobOrderInfo
|
||||
methods: [GET]
|
||||
|
||||
cust_api_ongoing_job_orders:
|
||||
path: /apiv2/job_orders/ongoing
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getAllOngoingJobOrders
|
||||
methods: [GET]
|
||||
|
||||
cust_api_ongoing_jo_count:
|
||||
path: /apiv2/job_orders/ongoing/count
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getOngoingJobOrderCount
|
||||
methods: [GET]
|
||||
|
||||
cust_api_new_location:
|
||||
path: /apiv2/new_location
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::addLocation
|
||||
methods: [POST]
|
||||
|
||||
cust_api_locations:
|
||||
path: /apiv2/locations
|
||||
controller: App\Controller\CustomerAppAPI\LocationController::getLocations
|
||||
methods: [GET]
|
||||
|
||||
cust_api_cust_vehicle_remove:
|
||||
path: /apiv2/vehicles/{id}/remove
|
||||
controller: App\Controller\CustomerAppAPI\VehicleController::removeVehicle
|
||||
methods: [POST]
|
||||
|
||||
cust_api_latest_job_order:
|
||||
path: /apiv2/job_order/latest
|
||||
controller: App\Controller\CustomerAppAPI\JobOrderController::getLatestJobOrder
|
||||
methods: [GET]
|
||||
|
||||
cust_api_customer_hash_get:
|
||||
path: /apiv2/customer_hash
|
||||
controller: App\Controller\CustomerAppAPI\CustomerController::getCustomerHash
|
||||
methods: [GET]
|
||||
|
||||
#cust_api_completed_job_orders:
|
||||
# path: /apiv2/job_orders/completed
|
||||
# controller: App\Controller\CustomerAppAPI\JobOrderController::getCompletedJobOrders
|
||||
# methods: [GET]
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
customer_location_list:
|
||||
path: /customer-locations
|
||||
controller: App\Controller\CustomerLocationController::index
|
||||
methods: [GET]
|
||||
|
||||
customer_location_rows:
|
||||
path: /customer-locations/rowdata
|
||||
controller: App\Controller\CustomerLocationController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
customer_location_add_form:
|
||||
path: /customer-locations/newform
|
||||
controller: App\Controller\CustomerLocationController::addForm
|
||||
methods: [GET]
|
||||
|
||||
customer_location_add_submit:
|
||||
path: /customer-locations
|
||||
controller: App\Controller\CustomerLocationController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
customer_location_update_form:
|
||||
path: /customer-locations/{id}
|
||||
controller: App\Controller\CustomerLocationController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
customer_location_update_submit:
|
||||
path: /customer-locations/{id}
|
||||
controller: App\Controller\CustomerLocationController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
customer_location_delete:
|
||||
path: /customer-locations/{id}
|
||||
controller: App\Controller\CustomerLocationController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
customertag_list:
|
||||
path: /customer_tags
|
||||
controller: App\Controller\CustomerTagController::index
|
||||
|
||||
customertag_rows:
|
||||
path: /customer_tags/rows
|
||||
controller: App\Controller\CustomerTagController::rows
|
||||
methods: [POST]
|
||||
|
||||
customertag_create:
|
||||
path: /customer_tags/create
|
||||
controller: App\Controller\CustomerTagController::addForm
|
||||
methods: [GET]
|
||||
|
||||
customertag_create_submit:
|
||||
path: /customer_tags/create
|
||||
controller: App\Controller\CustomerTagController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
customertag_update:
|
||||
path: /customer_tags/{id}
|
||||
controller: App\Controller\CustomerTagController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
customertag_update_submit:
|
||||
path: /customer_tags/{id}
|
||||
controller: App\Controller\CustomerTagController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
customertag_delete:
|
||||
path: /customer_tags/{id}
|
||||
controller: App\Controller\CustomerTagController::destroy
|
||||
methods: [DELETE]
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
dealer_list:
|
||||
path: /dealers
|
||||
controller: App\Controller\DealerController::index
|
||||
|
||||
dealer_rows:
|
||||
path: /dealers/rows
|
||||
controller: App\Controller\DealerController::rows
|
||||
methods: [POST]
|
||||
|
||||
dealer_create:
|
||||
path: /dealers/create
|
||||
controller: App\Controller\DealerController::addForm
|
||||
methods: [GET]
|
||||
|
||||
dealer_create_submit:
|
||||
path: /dealers/create
|
||||
controller: App\Controller\DealerController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
dealer_update:
|
||||
path: /dealers/{id}
|
||||
controller: App\Controller\DealerController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
dealer_update_submit:
|
||||
path: /dealers/{id}
|
||||
controller: App\Controller\DealerController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
dealer_delete:
|
||||
path: /dealers/{id}
|
||||
controller: App\Controller\DealerController::destroy
|
||||
methods: [DELETE]
|
||||
|
|
@ -11,7 +11,3 @@ test_gmap:
|
|||
test_distance:
|
||||
path: /test/distance
|
||||
controller: App\Controller\TestController::distance
|
||||
|
||||
test_motiv_connector:
|
||||
path: /test/motiv_connector
|
||||
controller: App\Controller\TestController::motivConnector
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
emergency_type_list:
|
||||
path: /emergency-types
|
||||
controller: App\Controller\EmergencyTypeController::index
|
||||
methods: [GET]
|
||||
|
||||
emergency_type_rows:
|
||||
path: /emergency-types/rowdata
|
||||
controller: App\Controller\EmergencyTypeController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
emergency_type_add_form:
|
||||
path: /emergency-types/newform
|
||||
controller: App\Controller\EmergencyTypeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
emergency_type_add_submit:
|
||||
path: /emergency-types
|
||||
controller: App\Controller\EmergencyTypeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
emergency_type_update_form:
|
||||
path: /emergency-types/{id}
|
||||
controller: App\Controller\EmergencyTypeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
emergency_type_update_submit:
|
||||
path: /emergency-types/{id}
|
||||
controller: App\Controller\EmergencyTypeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
emergency_type_delete:
|
||||
path: /emergency-types/{id}
|
||||
controller: App\Controller\EmergencyTypeController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# insurance
|
||||
|
||||
insurance_listener:
|
||||
path: /insurance/listen
|
||||
controller: App\Controller\InsuranceController::listen
|
||||
methods: [POST]
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
item_pricing:
|
||||
path: /item-pricing
|
||||
controller: App\Controller\ItemPricingController::index
|
||||
methods: [GET]
|
||||
|
||||
item_pricing_update:
|
||||
path: /item-pricing
|
||||
controller: App\Controller\ItemPricingController::formSubmit
|
||||
methods: [POST]
|
||||
|
||||
item_pricing_prices:
|
||||
path: /item-pricing/{pt_id}/{it_id}/prices
|
||||
controller: App\Controller\ItemPricingController::itemPrices
|
||||
methods: [GET]
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
item_type_list:
|
||||
path: /item-types
|
||||
controller: App\Controller\ItemTypeController::index
|
||||
methods: [GET]
|
||||
|
||||
item_type_rows:
|
||||
path: /item-types/rowdata
|
||||
controller: App\Controller\ItemTypeController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
item_type_add_form:
|
||||
path: /item-types/newform
|
||||
controller: App\Controller\ItemTypeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
item_type_add_submit:
|
||||
path: /item-types
|
||||
controller: App\Controller\ItemTypeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
item_type_update_form:
|
||||
path: /item-types/{id}
|
||||
controller: App\Controller\ItemTypeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
item_type_update_submit:
|
||||
path: /item-types/{id}
|
||||
controller: App\Controller\ItemTypeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
item_type_delete:
|
||||
path: /item-types/{id}
|
||||
controller: App\Controller\ItemTypeController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
|
@ -206,69 +206,3 @@ jo_tracker:
|
|||
controller: App\Controller\JobOrderController::tracker
|
||||
methods: [GET]
|
||||
|
||||
jo_walkin_form:
|
||||
path: /job-order/walk-in
|
||||
controller: App\Controller\JobOrderController::walkInForm
|
||||
methods: [GET]
|
||||
|
||||
jo_walkin_submit:
|
||||
path: /job-order/walk-in
|
||||
controller: App\Controller\JobOrderController::walkInSubmit
|
||||
methods: [POST]
|
||||
|
||||
jo_walkin_edit_form:
|
||||
path: /job-order/walk-in/{id}
|
||||
controller: App\Controller\JobOrderController::walkInEditForm
|
||||
methods: [GET]
|
||||
|
||||
jo_walkin_edit_submit:
|
||||
path: /job-order/walk-in/{id}
|
||||
controller: App\Controller\JobOrderController::walkInEditSubmit
|
||||
methods: [POST]
|
||||
|
||||
jo_autoassign:
|
||||
path: /job-order/autoassign
|
||||
controller: App\Controller\JobOrderController::autoAssignForm
|
||||
methods: [GET]
|
||||
|
||||
jo_autoassign_test_submit:
|
||||
path: /job-order/autoassign
|
||||
controller: App\Controller\JobOrderController::autoAssignSubmit
|
||||
methods: [POST]
|
||||
|
||||
jo_hub_view:
|
||||
path: /job-order/hub-view
|
||||
controller: App\Controller\JobOrderController::hubView
|
||||
methods: [GET]
|
||||
|
||||
jo_hub_view_rows:
|
||||
path: /job-order/hub-view-rows
|
||||
controller: App\Controller\JobOrderController::getHubViewRows
|
||||
methods: [POST]
|
||||
defaults:
|
||||
tier: "hub_view_all"
|
||||
|
||||
jo_hub_view_form:
|
||||
path: /job-order/hub-view/{id}
|
||||
controller: App\Controller\JobOrderController::hubViewForm
|
||||
methods: [GET]
|
||||
|
||||
jo_fulfill_cancel_submit:
|
||||
path: /job-order/fulfillcancel/{id}
|
||||
controller: App\Controller\JobOrderController::fulfillCancelSubmit
|
||||
methods: [POST]
|
||||
|
||||
jo_cancel_reasons:
|
||||
path: /ajax/jo_cancel_reasons
|
||||
controller: App\Controller\JobOrderController::cancelReasons
|
||||
methods: [GET]
|
||||
|
||||
jo_geofence:
|
||||
path: /ajax/job-order/geofence
|
||||
controller: App\Controller\JobOrderController::checkGeofence
|
||||
methods: [GET]
|
||||
|
||||
jo_all_view_form:
|
||||
path: /job-order/all/view/{id}
|
||||
controller: App\Controller\JobOrderController::allViewForm
|
||||
methods: [GET]
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
motolite_event_list:
|
||||
path: /motolite_events
|
||||
controller: App\Controller\MotoliteEventController::index
|
||||
|
||||
motolite_event_rows:
|
||||
path: /motolite_events/rows
|
||||
controller: App\Controller\MotoliteEventController::rows
|
||||
methods: [POST]
|
||||
|
||||
motolite_event_create:
|
||||
path: /motolite_events/create
|
||||
controller: App\Controller\MotoliteEventController::addForm
|
||||
methods: [GET]
|
||||
|
||||
motolite_event_create_submit:
|
||||
path: /motolite_events/create
|
||||
controller: App\Controller\MotoliteEventController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
motolite_event_upload_image:
|
||||
path: /motolite_events/upload
|
||||
controller: App\Controller\MotoliteEventController::uploadImage
|
||||
methods: [POST]
|
||||
|
||||
motolite_event_update:
|
||||
path: /motolite_events/{id}
|
||||
controller: App\Controller\MotoliteEventController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
motolite_event_update_submit:
|
||||
path: /motolite_events/{id}
|
||||
controller: App\Controller\MotoliteEventController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
motolite_event_delete:
|
||||
path: /motolite_events/{id}
|
||||
controller: App\Controller\MotoliteEventController::destroy
|
||||
methods: [DELETE]
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
ownership_type_list:
|
||||
path: /ownership-types
|
||||
controller: App\Controller\OwnershipTypeController::index
|
||||
methods: [GET]
|
||||
|
||||
ownership_type_rows:
|
||||
path: /ownership-types/rowdata
|
||||
controller: App\Controller\OwnershipTypeController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
ownership_type_add_form:
|
||||
path: /ownership-types/newform
|
||||
controller: App\Controller\OwnershipTypeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
ownership_type_add_submit:
|
||||
path: /ownership-types
|
||||
controller: App\Controller\OwnershipTypeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
ownership_type_update_form:
|
||||
path: /ownership-types/{id}
|
||||
controller: App\Controller\OwnershipTypeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
ownership_type_update_submit:
|
||||
path: /ownership-types/{id}
|
||||
controller: App\Controller\OwnershipTypeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
ownership_type_delete:
|
||||
path: /ownership-types/{id}
|
||||
controller: App\Controller\OwnershipTypeController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# paymongo
|
||||
|
||||
paymongo_listener:
|
||||
path: /paymongo/listen
|
||||
controller: App\Controller\PayMongoController::listen
|
||||
methods: [POST]
|
||||
|
||||
paymongo_payment_success:
|
||||
path: /paymongo/success
|
||||
controller: App\Controller\PayMongoController::paymentSuccess
|
||||
methods: [GET]
|
||||
|
||||
paymongo_payment_cancelled:
|
||||
path: /paymongo/cancelled
|
||||
controller: App\Controller\PayMongoController::paymentCancelled
|
||||
methods: [GET]
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
price_tier_list:
|
||||
path: /price-tiers
|
||||
controller: App\Controller\PriceTierController::index
|
||||
methods: [GET]
|
||||
|
||||
price_tier_rows:
|
||||
path: /price-tiers/rows
|
||||
controller: App\Controller\PriceTierController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
price_tier_add_form:
|
||||
path: /price-tiers/newform
|
||||
controller: App\Controller\PriceTierController::addForm
|
||||
methods: [GET]
|
||||
|
||||
price_tier_add_submit:
|
||||
path: /price-tiers
|
||||
controller: App\Controller\PriceTierController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
price_tier_update_form:
|
||||
path: /price-tiers/{id}
|
||||
controller: App\Controller\PriceTierController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
price_tier_update_submit:
|
||||
path: /price-tiers/{id}
|
||||
controller: App\Controller\PriceTierController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
price_tier_delete:
|
||||
path: /price-tiers/{id}
|
||||
controller: App\Controller\PriceTierController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
|
@ -73,97 +73,7 @@ rep_warranty_details_form:
|
|||
controller: App\Controller\ReportController::warrantyDetailsForm
|
||||
methods: [GET]
|
||||
|
||||
rep_warranty_details_submit:
|
||||
rep_warranty_details_export_csv:
|
||||
path: /report/warranty_details_report
|
||||
controller: App\Controller\ReportController::warrantyDetailsSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_jo_details_form:
|
||||
path: /report/jo_details_report
|
||||
controller: App\Controller\ReportController::jobOrderDetailsForm
|
||||
methods: [GET]
|
||||
|
||||
rep_jo_details_submit:
|
||||
path: /report/jo_details_report
|
||||
controller: App\Controller\ReportController::jobOrderDetailsSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_jo_events_form:
|
||||
path: /report/jo_events_report
|
||||
controller: App\Controller\ReportController::jobOrderEventsForm
|
||||
methods: [GET]
|
||||
|
||||
rep_jo_events_submit:
|
||||
path: /report/jo_events_report
|
||||
controller: App\Controller\ReportController::jobOrderEventsSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_sms_messages_form:
|
||||
path: /report/sms_messages_report
|
||||
controller: App\Controller\ReportController::smsMessagesForm
|
||||
methods: [GET]
|
||||
|
||||
rep_sms_messages_submit:
|
||||
path: /report/sms_messages_report
|
||||
controller: App\Controller\ReportController::smsMessagesSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_jo_auto_assign_form:
|
||||
path: /report/jo_auto_assign_report
|
||||
controller: App\Controller\ReportController::jobOrderAutoAssignForm
|
||||
methods: [GET]
|
||||
|
||||
rep_jo_auto_assign_submit:
|
||||
path: /report/jo_auto_assign_report
|
||||
controller: App\Controller\ReportController::jobOrderAutoAssignSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_jo_advance_order_form:
|
||||
path: /report/jo_advance_order_report
|
||||
controller: App\Controller\ReportController::jobOrderAdvanceOrderForm
|
||||
methods: [GET]
|
||||
|
||||
rep_jo_advance_order_submit:
|
||||
path: /report/jo_advance_order_report
|
||||
controller: App\Controller\ReportController::jobOrderAdvanceOrderSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_customer_source_form:
|
||||
path: /report/customer_source_report
|
||||
controller: App\Controller\ReportController::customerSourceForm
|
||||
methods: [GET]
|
||||
|
||||
rep_customer_source_submit:
|
||||
path: /report/customer_source_report
|
||||
controller: App\Controller\ReportController::customerSourceSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_hub_filter_form:
|
||||
path: /report/hub_filter_report
|
||||
controller: App\Controller\ReportController::hubFilterForm
|
||||
methods: [GET]
|
||||
|
||||
rep_hub_filter_submit:
|
||||
path: /report/hub_filter_report
|
||||
controller: App\Controller\ReportController::hubFilterSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_warranty_raffle_form:
|
||||
path: /report/warranty_raffle_report
|
||||
controller: App\Controller\ReportController::warrantyRaffleForm
|
||||
methods: [GET]
|
||||
|
||||
rep_warranty_raffle_submit:
|
||||
path: /report/warranty_raffle_report
|
||||
controller: App\Controller\ReportController::warrantyRaffleSubmit
|
||||
methods: [POST]
|
||||
|
||||
rep_jo_raffle_form:
|
||||
path: /report/jo_raffle_report
|
||||
controller: App\Controller\ReportController::joRaffleForm
|
||||
methods: [GET]
|
||||
|
||||
rep_jo_raffle_submit:
|
||||
path: /report/jo_raffle_report
|
||||
controller: App\Controller\ReportController::joRaffleSubmit
|
||||
controller: App\Controller\ReportController::warrantyDetailsExportCSV
|
||||
methods: [POST]
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
jo_resq_proc:
|
||||
path: /resq-job-order/processing
|
||||
controller: App\Controller\ResqJobOrderController::listProcessing
|
||||
methods: [GET]
|
||||
|
||||
jo_resq_proc_rows:
|
||||
path: /resq-job-order/processing-rows
|
||||
controller: App\Controller\ResqJobOrderController::datatableRows
|
||||
methods: [POST]
|
||||
defaults:
|
||||
tier: "proc"
|
||||
|
||||
jo_resq_all:
|
||||
path: /resq-job-order/all
|
||||
controller: App\Controller\ResqJobOrderController::listAll
|
||||
methods: [GET]
|
||||
|
||||
jo_resq_all_rows:
|
||||
path: /resq-job-orer/all
|
||||
controller: App\Controller\ResqJobOrderController::datatableRows
|
||||
methods: [POST]
|
||||
defaults:
|
||||
tier: "all"
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
reviewtag_list:
|
||||
path: /review_tags
|
||||
controller: App\Controller\ReviewTagController::index
|
||||
|
||||
reviewtag_rows:
|
||||
path: /review_tags/rows
|
||||
controller: App\Controller\ReviewTagController::rows
|
||||
methods: [POST]
|
||||
|
||||
reviewtag_create:
|
||||
path: /review_tags/create
|
||||
controller: App\Controller\ReviewTagController::addForm
|
||||
methods: [GET]
|
||||
|
||||
reviewtag_create_submit:
|
||||
path: /review_tags/create
|
||||
controller: App\Controller\ReviewTagController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
reviewtag_update:
|
||||
path: /review_tags/{id}
|
||||
controller: App\Controller\ReviewTagController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
reviewtag_update_submit:
|
||||
path: /review_tags/{id}
|
||||
controller: App\Controller\ReviewTagController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
reviewtag_delete:
|
||||
path: /review_tags/{id}
|
||||
controller: App\Controller\ReviewTagController::destroy
|
||||
methods: [DELETE]
|
||||
|
|
@ -41,23 +41,3 @@ rider_ajax_popup:
|
|||
path: /riders/{id}/popup
|
||||
controller: App\Controller\RiderController::popupInfo
|
||||
methods: [GET]
|
||||
|
||||
rider_active_jo:
|
||||
path: /riders/{id}/activejo/{jo_id}
|
||||
controller: App\Controller\RiderController::riderActiveJO
|
||||
methods: [GET]
|
||||
|
||||
rider_priority_up_jo:
|
||||
path: /riders/{id}/priority_up/{jo_id}
|
||||
controller: App\Controller\RiderController::priorityUpJO
|
||||
methods: [GET]
|
||||
|
||||
rider_priority_down_jo:
|
||||
path: /riders/{id}/priority_down/{jo_id}
|
||||
controller: App\Controller\RiderController::priorityDownJO
|
||||
methods: [GET]
|
||||
|
||||
rider_ajax_available:
|
||||
path: /riders/{id}/available
|
||||
controller: App\Controller\RiderController::ajaxAvailable
|
||||
methods: [GET]
|
||||
|
|
|
|||
|
|
@ -64,34 +64,3 @@ rapi_available:
|
|||
path: /rapi/available
|
||||
controller: App\Controller\RAPIController::available
|
||||
methods: [POST]
|
||||
|
||||
rapi_hub_depart:
|
||||
path: /rapi/hub_depart
|
||||
controller: App\Controller\RAPIController::hubDepart
|
||||
methods: [POST]
|
||||
|
||||
rapi_pre_hub_depart:
|
||||
path: /rapi/pre_hub_depart
|
||||
controller: App\Controller\RAPIController::preHubDepart
|
||||
methods: [POST]
|
||||
|
||||
rapi_pre_hub_arrive:
|
||||
path: /rapi/pre_hub_arrive
|
||||
controller: App\Controller\RAPIController::preHubArrive
|
||||
methods: [POST]
|
||||
|
||||
rapi_post_hub_depart:
|
||||
path: /rapi/post_hub_depart
|
||||
controller: App\Controller\RAPIController::postHubDepart
|
||||
methods: [POST]
|
||||
|
||||
rapi_post_hub_arrive:
|
||||
path: /rapi/post_hub_arrive
|
||||
controller: App\Controller\RAPIController::postHubArrive
|
||||
methods: [POST]
|
||||
|
||||
rapi_jo_start:
|
||||
path: /rapi/start
|
||||
controller: App\Controller\RAPIController::startJobOrder
|
||||
methods: [POST]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
# sap battery
|
||||
|
||||
sapbattery_list:
|
||||
path: /sap-batteries
|
||||
controller: App\Controller\SAPBatteryController::index
|
||||
|
||||
sapbattery_rows:
|
||||
path: /sap-batteries/rows
|
||||
controller: App\Controller\SAPBatteryController::rows
|
||||
methods: [POST]
|
||||
|
||||
sapbattery_upload_image:
|
||||
path: /sap-batteries/upload
|
||||
controller: App\Controller\SAPBatteryController::uploadImage
|
||||
methods: [POST]
|
||||
|
||||
sapbattery_create:
|
||||
path: /sap-batteries/create
|
||||
controller: App\Controller\SAPBatteryController::addForm
|
||||
methods: [GET]
|
||||
|
||||
sapbattery_create_submit:
|
||||
path: /sap-batteries/create
|
||||
controller: App\Controller\SAPBatteryController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbattery_update:
|
||||
path: /sap-batteries/{id}
|
||||
controller: App\Controller\SAPBatteryController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
sapbattery_update_submit:
|
||||
path: /sap-batteries/{id}
|
||||
controller: App\Controller\SAPBatteryController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbattery_delete:
|
||||
path: /sap-batteries/{id}
|
||||
controller: App\Controller\SAPBatteryController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
# sap battery brands
|
||||
|
||||
sapbrand_list:
|
||||
path: /sap-battery-brands
|
||||
controller: App\Controller\SAPBatteryBrandController::index
|
||||
|
||||
sapbrand_rows:
|
||||
path: /sap-battery-brands/rows
|
||||
controller: App\Controller\SAPBatteryBrandController::rows
|
||||
methods: [POST]
|
||||
|
||||
sapbrand_create:
|
||||
path: /sap-battery-brands/create
|
||||
controller: App\Controller\SAPBatteryBrandController::addForm
|
||||
methods: [GET]
|
||||
|
||||
sapbrand_create_submit:
|
||||
path: /sap-battery-brands/create
|
||||
controller: App\Controller\SAPBatteryBrandController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbrand_update:
|
||||
path: /sap-battery-brands/{id}
|
||||
controller: App\Controller\SAPBatteryBrandController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
sapbrand_update_submit:
|
||||
path: /sap-battery-brands/{id}
|
||||
controller: App\Controller\SAPBatteryBrandController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbrand_delete:
|
||||
path: /sap-battery-brands/{id}
|
||||
controller: App\Controller\SAPBatteryBrandController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
# sap battery sizes
|
||||
|
||||
sapbsize_list:
|
||||
path: /sap-battery-sizes
|
||||
controller: App\Controller\SAPBatterySizeController::index
|
||||
|
||||
sapbsize_rows:
|
||||
path: /sap-battery-sizes/rows
|
||||
controller: App\Controller\SAPBatterySizeController::rows
|
||||
methods: [POST]
|
||||
|
||||
sapbsize_create:
|
||||
path: /sap-battery-sizes/create
|
||||
controller: App\Controller\SAPBatterySizeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
sapbsize_create_submit:
|
||||
path: /sap-battery-sizes/create
|
||||
controller: App\Controller\SAPBatterySizeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbsize_update:
|
||||
path: /sap-battery-sizes/{id}
|
||||
controller: App\Controller\SAPBatterySizeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
sapbsize_update_submit:
|
||||
path: /sap-battery-sizes/{id}
|
||||
controller: App\Controller\SAPBatterySizeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapbsize_delete:
|
||||
path: /sap-battery-sizes/{id}
|
||||
controller: App\Controller\SAPBatterySizeController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
# sap battery container sizes
|
||||
sapcsize_list:
|
||||
path: /sap-battery-container-sizes
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::index
|
||||
|
||||
sapcsize_rows:
|
||||
path: /sap-battery-container-sizes/rows
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::rows
|
||||
methods: [POST]
|
||||
|
||||
sapcsize_create:
|
||||
path: /sap-battery-container-sizes/create
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
sapcsize_create_submit:
|
||||
path: /sap-battery-container-sizes/create
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapcsize_update:
|
||||
path: /sap-battery-container-sizes/{id}
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
sapcsize_update_submit:
|
||||
path: /sap-battery-container-sizes/{id}
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
sapcsize_delete:
|
||||
path: /sap-battery-container-sizes/{id}
|
||||
controller: App\Controller\SAPBatteryContainerSizeController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
service_charge_list:
|
||||
path: /service_charges
|
||||
controller: App\Controller\ServiceChargeController::index
|
||||
|
||||
service_charge_rows:
|
||||
path: /service_charges/rows
|
||||
controller: App\Controller\ServiceChargeController::rows
|
||||
methods: [POST]
|
||||
|
||||
service_charge_create:
|
||||
path: /service_charges/create
|
||||
controller: App\Controller\ServiceChargeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
service_charge_create_submit:
|
||||
path: /service_charges/create
|
||||
controller: App\Controller\ServiceChargeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
service_charge_update:
|
||||
path: /service_charges/{id}
|
||||
controller: App\Controller\ServiceChargeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
service_charge_update_submit:
|
||||
path: /service_charges/{id}
|
||||
controller: App\Controller\ServiceChargeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
service_charge_delete:
|
||||
path: /service_charges/{id}
|
||||
controller: App\Controller\ServiceChargeController::destroy
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
service_offering_list:
|
||||
path: /service-offerings
|
||||
controller: App\Controller\ServiceOfferingController::index
|
||||
methods: [GET]
|
||||
|
||||
service_offering_rows:
|
||||
path: /service-offerings/rowdata
|
||||
controller: App\Controller\ServiceOfferingController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
service_offering_add_form:
|
||||
path: /service-offerings/newform
|
||||
controller: App\Controller\ServiceOfferingController::addForm
|
||||
methods: [GET]
|
||||
|
||||
service_offering_add_submit:
|
||||
path: /service-offerings
|
||||
controller: App\Controller\ServiceOfferingController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
service_offering_update_form:
|
||||
path: /service-offerings/{id}
|
||||
controller: App\Controller\ServiceOfferingController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
service_offering_update_submit:
|
||||
path: /service-offerings/{id}
|
||||
controller: App\Controller\ServiceOfferingController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
service_offering_delete:
|
||||
path: /service-offerings/{id}
|
||||
controller: App\Controller\ServiceOfferingController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# sms handling - rising tide
|
||||
|
||||
sms_delivery_receipt:
|
||||
path: /sms/delivery_receipt
|
||||
controller: App\Controller\SMSController::deliveryReceipt
|
||||
methods: [POST]
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
subticket_type_list:
|
||||
path: /subticket-types
|
||||
controller: App\Controller\SubTicketTypeController::index
|
||||
methods: [GET]
|
||||
|
||||
subticket_type_rows:
|
||||
path: /subticket-types/rowdata
|
||||
controller: App\Controller\SubTicketTypeController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
subticket_type_add_form:
|
||||
path: /subticket-types/newform
|
||||
controller: App\Controller\SubTicketTypeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
subticket_type_add_submit:
|
||||
path: /subticket-types
|
||||
controller: App\Controller\SubTicketTypeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
subticket_type_update_form:
|
||||
path: /subticket-types/{id}
|
||||
controller: App\Controller\SubTicketTypeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
subticket_type_update_submit:
|
||||
path: /subticket-types/{id}
|
||||
controller: App\Controller\SubTicketTypeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
subticket_type_delete:
|
||||
path: /subticket-types/{id}
|
||||
controller: App\Controller\SubTicketTypeController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
# third party api
|
||||
|
||||
# job order
|
||||
tapi_jo_request:
|
||||
path: /tapi/job_order
|
||||
controller: App\Controller\TAPI\JobOrderController::requestJobOrder
|
||||
methods: [POST]
|
||||
|
||||
tapi_estimate:
|
||||
path: /tapi/estimate
|
||||
controller: App\Controller\TAPI\JobOrderController::getEstimate
|
||||
methods: [POST]
|
||||
|
||||
tapi_jo_invoice:
|
||||
path: /tapi/job_order/invoice/{jo_id}
|
||||
controller: App\Controller\TAPI\JobOrderController:getJOInvoice
|
||||
methods: [GET]
|
||||
|
||||
tapi_jo_cancel:
|
||||
path: /tapi/job_order/cancel
|
||||
controller: App\Controller\TAPI\JobOrderController:cancelJobOrder
|
||||
methods: [POST]
|
||||
|
||||
tapi_jo_info:
|
||||
path: /tapi/job_order/{jo_id}/info
|
||||
controller: App\Controller\TAPI\JobOrderController::getJobOrderInfo
|
||||
methods: [GET]
|
||||
|
||||
tapi_location_support:
|
||||
path: /tapi/location_support
|
||||
controller: App\Controller\TAPI\JobOrderController:locationSupport
|
||||
methods: [POST]
|
||||
|
||||
tapi_nearest_hub_slots:
|
||||
path: /tapi/hub_slots
|
||||
controller: App\Controller\TAPI\JobOrderController::getNearestHubAndSlots
|
||||
methods: [POST]
|
||||
|
||||
# vehicle manufacturer and vehicle
|
||||
tapi_vehicle_mfg_list:
|
||||
path: /tapi/vehicle/mfgs
|
||||
controller: App\Controller\TAPI\VehicleController::listVehicleManufacturers
|
||||
methods: [GET]
|
||||
|
||||
tapi_vehicle_make_list:
|
||||
path: /tapi/vehicle/mfgs/{mfg_id}/makes
|
||||
controller: App\Controller\TAPI\VehicleController::listVehicleMakes
|
||||
methods: [GET]
|
||||
|
||||
# battery
|
||||
tapi_battery_list:
|
||||
path: /tapi/vehicles/{vid}/compatible_batteries
|
||||
controller: App\Controller\TAPI\BatteryController::getCompatibleBatteries
|
||||
methods: [POST]
|
||||
|
||||
# promos
|
||||
tapi_promo_list:
|
||||
path: /tapi/promos
|
||||
controller: App\Controller\TAPI\PromoController::listPromos
|
||||
methods: [GET]
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
ticket_type_list:
|
||||
path: /ticket-types
|
||||
controller: App\Controller\TicketTypeController::index
|
||||
methods: [GET]
|
||||
|
||||
ticket_type_rows:
|
||||
path: /ticket-types/rowdata
|
||||
controller: App\Controller\TicketTypeController::datatableRows
|
||||
methods: [POST]
|
||||
|
||||
ticket_type_add_form:
|
||||
path: /ticket-types/newform
|
||||
controller: App\Controller\TicketTypeController::addForm
|
||||
methods: [GET]
|
||||
|
||||
ticket_type_add_submit:
|
||||
path: /ticket-types
|
||||
controller: App\Controller\TicketTypeController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
ticket_type_update_form:
|
||||
path: /ticket-types/{id}
|
||||
controller: App\Controller\TicketTypeController::updateForm
|
||||
methods: [GET]
|
||||
|
||||
ticket_type_update_submit:
|
||||
path: /ticket-types/{id}
|
||||
controller: App\Controller\TicketTypeController::updateSubmit
|
||||
methods: [POST]
|
||||
|
||||
ticket_type_delete:
|
||||
path: /ticket-types/{id}
|
||||
controller: App\Controller\TicketTypeController::deleteSubmit
|
||||
methods: [DELETE]
|
||||
|
||||
|
|
@ -12,11 +12,6 @@ parameters:
|
|||
app_access_key: 'access_keys'
|
||||
cvu_brand_id: "%env(CVU_BRAND_ID)%"
|
||||
country_code: "%env(COUNTRY_CODE)%"
|
||||
api_version: "%env(API_VERSION)%"
|
||||
android_app_version: "%env(ANDROID_APP_VERSION)%"
|
||||
ios_app_version: "%env(IOS_APP_VERSION)%"
|
||||
insurance_premiums_banner_url: "%env(INSURANCE_PREMIUMS_BANNER_URL)%"
|
||||
enabled_hub_filters: "%env(ENABLED_HUB_FILTERS)%"
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
|
|
@ -47,6 +42,20 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -55,7 +64,6 @@ services:
|
|||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$gmaps_api_key: "%env(GMAPS_API_KEY)%"
|
||||
$cust_dist_limit: "%env(CUST_DISTANCE_LIMIT)%"
|
||||
|
||||
App\Service\RisingTideGateway:
|
||||
arguments:
|
||||
|
|
@ -64,18 +72,12 @@ services:
|
|||
$pass: "%env(RT_PASS)%"
|
||||
$usage_type: "%env(RT_USAGE_TYPE)%"
|
||||
$shortcode: "%env(RT_SHORTCODE)%"
|
||||
$dr_url: "https://resqaws.jankstudio.com/sms/delivery_receipt"
|
||||
|
||||
App\Service\MQTTClient:
|
||||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
$key: "mqtt_events"
|
||||
|
||||
App\Service\MQTTClientApiv2:
|
||||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
$key: "mqtt_events"
|
||||
|
||||
App\Service\APNSClient:
|
||||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
|
@ -106,61 +108,111 @@ services:
|
|||
$cvu_mfg_id: "%env(CVU_MFG_ID)%"
|
||||
$cvu_brand_id: "%env(CVU_BRAND_ID)%"
|
||||
|
||||
App\Command\LoadWarrantySerialCommand:
|
||||
arguments:
|
||||
$callback_url: "%env(WARRANTY_SERIAL_CALLBACK_URL)%"
|
||||
|
||||
App\Command\ProcessLatePaymongoTransactionsCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$paymongo: "@App\\Service\\PayMongoConnector"
|
||||
$webhook_id: "%env(PAYMONGO_WEBHOOK_ID)%"
|
||||
|
||||
# rider tracker service
|
||||
App\Service\RiderTracker:
|
||||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\ResqInvoiceGenerator: ~
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# CMB invoice generator
|
||||
App\Service\InvoiceGenerator\CMBInvoiceGenerator: ~
|
||||
|
||||
# Resq invoice generator
|
||||
#App\Service\InvoiceGenerator\ResqInvoiceGenerator: ~
|
||||
|
||||
# invoice generator interface
|
||||
App\Service\InvoiceGeneratorInterface: "@App\\Service\\InvoiceManager"
|
||||
|
||||
# invoice manager
|
||||
App\Service\InvoiceManager: ~
|
||||
App\Service\InvoiceGeneratorInterface: "@App\\Service\\InvoiceGenerator\\CMBInvoiceGenerator"
|
||||
#App\Service\InvoiceGeneratorInterface: "@App\\Service\\InvoiceGenerator\\ResqInvoiceGenerator"
|
||||
|
||||
# job order generator
|
||||
App\Service\JobOrderHandler\ResqJobOrderHandler:
|
||||
arguments:
|
||||
$country_code: "%env(COUNTRY_CODE)%"
|
||||
$cust_distance_limit: "%env(CUST_DISTANCE_LIMIT_ADMIN_PANEL)%"
|
||||
$hub_filter_enabled: "%env(HUB_FILTER_ENABLE)%"
|
||||
# Resq job order generator
|
||||
#App\Service\JobOrderHandler\ResqJobOrderHandler:
|
||||
# arguments:
|
||||
# $country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
#job order generator interface
|
||||
App\Service\JobOrderHandlerInterface: "@App\\Service\\JobOrderHandler\\ResqJobOrderHandler"
|
||||
|
||||
# customer generator
|
||||
App\Service\CustomerHandler\ResqCustomerHandler:
|
||||
# CMB job order generator
|
||||
App\Service\JobOrderHandler\CMBJobOrderHandler:
|
||||
arguments:
|
||||
$country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
#job order generator interface
|
||||
App\Service\JobOrderHandlerInterface: "@App\\Service\\JobOrderHandler\\CMBJobOrderHandler"
|
||||
#App\Service\JobOrderHandlerInterface: "@App\\Service\\JobOrderHandler\\ResqJobOrderHandler"
|
||||
|
||||
# CMB customer generator
|
||||
App\Service\CustomerHandler\CMBCustomerHandler:
|
||||
arguments:
|
||||
$country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
# Resq customer generator
|
||||
#App\Service\CustomerHandler\ResqCustomerHandler:
|
||||
# arguments:
|
||||
# $country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
# customer generator interface
|
||||
App\Service\CustomerHandlerInterface: "@App\\Service\\CustomerHandler\\ResqCustomerHandler"
|
||||
App\Service\CustomerHandlerInterface: "@App\\Service\\CustomerHandler\\CMBCustomerHandler"
|
||||
#App\Service\CustomerHandlerInterface: "@App\\Service\\CustomerHandler\\ResqCustomerHandler"
|
||||
|
||||
# rider assignment
|
||||
App\Service\RiderAssignmentHandler\ResqRiderAssignmentHandler: ~
|
||||
#App\Service\RiderAssignmentHandler\CMBRiderAssignmentHandler: ~
|
||||
|
||||
# rider assignment interface
|
||||
App\Service\RiderAssignmentHandlerInterface: "@App\\Service\\RiderAssignmentHandler\\ResqRiderAssignmentHandler"
|
||||
App\Service\RiderAssignmentHandlerInterface: "@App\\Service\\RiderAssignmentHandler\\CMBRiderAssignmentHandler"
|
||||
|
||||
# rider API service
|
||||
App\Service\RiderAPIHandler\ResqRiderAPIHandler:
|
||||
App\Service\RiderAPIHandler\CMBRiderAPIHandler:
|
||||
arguments:
|
||||
$country_code: "%env(COUNTRY_CODE)%"
|
||||
$country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
#App\Service\RiderAPIHandler\ResqRiderAPIHandler:
|
||||
# arguments:
|
||||
# $country_code: "%env(COUNTRY_CODE)%"
|
||||
|
||||
# rider API interface
|
||||
App\Service\RiderAPIHandlerInterface: "@App\\Service\\RiderAPIHandler\\CMBRiderAPIHandler"
|
||||
|
||||
App\Service\RiderAPIHandlerInterface: "@App\\Service\\RiderAPIHandler\\ResqRiderAPIHandler"
|
||||
|
||||
# map manager
|
||||
#App\Service\GISManager\Bing: ~
|
||||
App\Service\GISManager\OpenStreet: ~
|
||||
|
|
@ -189,170 +241,9 @@ services:
|
|||
arguments:
|
||||
$redis_prov: "@App\\Service\\RedisClientProvider"
|
||||
$active_jo_key: "%env(LOCATION_JO_ACTIVE_KEY)%"
|
||||
$latest_jo_key: "%env(LATEST_ACTIVE_JO)%"
|
||||
|
||||
App\Service\RiderCache:
|
||||
arguments:
|
||||
$redis_prov: "@App\\Service\\RedisClientProvider"
|
||||
$loc_key: "%env(LOCATION_RIDER_ACTIVE_KEY)%"
|
||||
$status_key: "%env(STATUS_RIDER_KEY)%"
|
||||
|
||||
# inventory manager
|
||||
App\Service\InventoryManager:
|
||||
arguments:
|
||||
$api_url: "%env(INVENTORY_API_URL)%"
|
||||
$api_ocp_key: "%env(INVENTORY_API_OCP)%"
|
||||
$api_auth_prefix: "%env(INVENTORY_API_AUTH_TOKEN_PREFIX)%"
|
||||
$api_auth_token: "%env(INVENTORY_API_AUTH_TOKEN)%"
|
||||
|
||||
# API logging
|
||||
App\EventSubscriber\LogSubscriber:
|
||||
arguments:
|
||||
$api_log_flag: "%env(API_LOGGING)%"
|
||||
|
||||
# motiv connector
|
||||
App\Service\MotivConnector:
|
||||
arguments:
|
||||
$base_url: "%env(MOTIV_BASE_URL)%"
|
||||
$sub_key: "%env(MOTIV_KEY)%"
|
||||
$token: "%env(MOTIV_TOKEN)%"
|
||||
|
||||
# insurance connector
|
||||
App\Service\InsuranceConnector:
|
||||
arguments:
|
||||
$base_url: "%env(INSURANCE_BASE_URL)%"
|
||||
$username: "%env(INSURANCE_USERNAME)%"
|
||||
$password: "%env(INSURANCE_PASSWORD)%"
|
||||
|
||||
# entity listener for gateway transactions
|
||||
App\EntityListener\GatewayTransactionListener:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$ic: "@App\\Service\\InsuranceConnector"
|
||||
tags:
|
||||
- name: doctrine.orm.entity_listener
|
||||
event: 'postUpdate'
|
||||
entity: 'App\Entity\GatewayTransaction'
|
||||
|
||||
# paymongo connector
|
||||
App\Service\PayMongoConnector:
|
||||
arguments:
|
||||
$base_url: "%env(PAYMONGO_BASE_URL)%"
|
||||
$public_key: "%env(PAYMONGO_PUBLIC_KEY)%"
|
||||
$secret_key: "%env(PAYMONGO_SECRET_KEY)%"
|
||||
|
||||
# entity listener for customer vehicle warranty code history
|
||||
App\EntityListener\CustomerVehicleSerialListener:
|
||||
arguments:
|
||||
$ts: "@security.token_storage"
|
||||
tags:
|
||||
- name: doctrine.orm.entity_listener
|
||||
event: 'preUpdate'
|
||||
entity: 'App\Entity\CustomerVehicle'
|
||||
- name: doctrine.orm.entity_listener
|
||||
event: 'postUpdate'
|
||||
entity: 'App\Entity\CustomerVehicle'
|
||||
- name: doctrine.orm.entity_listener
|
||||
event: 'postPersist'
|
||||
entity: 'App\Entity\CustomerVehicle'
|
||||
|
||||
# warranty api logger
|
||||
App\Service\WarrantyAPILogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# warranty logger for raffle
|
||||
App\Service\WarrantyRaffleLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# warranty raffle filter
|
||||
App\Service\WarrantyRaffleFilter: ~
|
||||
|
||||
# promo logger
|
||||
App\Service\PromoLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# hub service
|
||||
App\Service\HubSelector:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$im: "@App\\Service\\InventoryManager"
|
||||
$hub_distributor: "@App\\Service\\HubDistributor"
|
||||
$hub_filter_logger: "@App\\Service\\HubFilterLogger"
|
||||
|
||||
# hub distributor
|
||||
App\Service\HubDistributor:
|
||||
arguments:
|
||||
$redis: "@App\\Service\\RedisClientProvider"
|
||||
$hub_jo_key: "%env(HUB_JO_KEY)%"
|
||||
|
||||
# hub filter logger
|
||||
App\Service\HubFilterLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# hub filter geofence checking
|
||||
App\Service\HubFilteringGeoChecker:
|
||||
arguments:
|
||||
$geofence_flag: "%env(HUB_GEOFENCE_ENABLE)%"
|
||||
|
||||
# bulk warranty uploader
|
||||
App\Service\WarrantyBulkUploader:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# warranty serial file logger
|
||||
App\Service\WarrantySerialUploadLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# warranty serial load logger
|
||||
App\Service\WarrantySerialLoadLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# FCM sender
|
||||
App\Service\FCMSender:
|
||||
arguments:
|
||||
$server_key: "%env(FCM_SERVER_KEY)%"
|
||||
$sender_id: "%env(FCM_SENDER_ID)%"
|
||||
|
||||
# price tier manager
|
||||
App\Service\PriceTierManager:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# hub filters
|
||||
App\Service\HubFilter\BaseHubFilter:
|
||||
arguments:
|
||||
$hub_filter_logger: "@App\\Service\\HubFilterLogger"
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$rt: "@App\\Service\\RisingTideGateway"
|
||||
$trans: "@Symfony\\Contracts\\Translation\\TranslatorInterface"
|
||||
|
||||
App\Service\HubFilter\Filters\DateAndTimeHubFilter:
|
||||
public: true
|
||||
|
||||
App\Service\HubFilter\Filters\JoTypeHubFilter:
|
||||
public: true
|
||||
|
||||
App\Service\HubFilter\Filters\MaxResultsHubFilter:
|
||||
public: true
|
||||
|
||||
App\Service\HubFilter\Filters\PaymentMethodHubFilter:
|
||||
public: true
|
||||
|
||||
App\Service\HubFilter\Filters\RiderAvailabilityHubFilter:
|
||||
public: true
|
||||
|
||||
App\Service\HubFilter\Filters\InventoryHubFilter:
|
||||
public: true
|
||||
arguments:
|
||||
$im: "@App\\Service\\InventoryManager"
|
||||
|
||||
App\Service\HubFilter\Filters\RoundRobinHubFilter:
|
||||
public: true
|
||||
arguments:
|
||||
$hub_distributor: "@App\\Service\\HubDistributor"
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
INSERT INTO `service_charge` VALUES(1,'Bangi',20),(2,'Banting',30),(3,'Bdr Saujana Utama',20),(4,'Bdr Seri Coalfields',30),(5,'Bdr Baru Bangi',20),(6,'Bdr Saujana Putra',20),(7,'Bukit Beruntung',30),(8,'Cyberjaya',20),(9,'Dengkil',30),(10,'Hulu Langat',20),(11,'Jenjarom',30),(12,'Klia',30),(13,'Meru',20),(14,'Port Klang',20),(15,'Pulau Indah',30),(16,'Puncak Alam',20),(17,'Putrajaya',20),(18,'Rawang',30),(19,'Salak Tinggi',30),(20,'Semenyih',20),(21,'Sepang',30),(22,'Serendah',30),(23,'Sungai Buloh',20),(24,'Teluk Panglima Garang',30),(25,'Uitm Puncak Alam',20),(26,'12am - 7am',10),(27,'Out of define Klg Valley',20),(28,'Airport',35),(29,'Jump start',50),(30,'Product warranty service charge - existing BA customer',20),(31,'Product warranty service charge - non BA customer',40);
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
UPDATE customer SET date_create=NOW() WHERE date_create="0000-00-00 00:00:00";
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
UPDATE job_order jo, customer c, customer_vehicle cv SET jo.first_name = c.first_name, jo.last_name = c.last_name, jo.phone_mobile = c.phone_mobile, jo.plate_number = cv.plate_number WHERE jo.customer_id = c.id AND jo.cvehicle_id = cv.id;
|
||||
|
|
@ -155,30 +155,6 @@ span.has-danger,
|
|||
color: #fff !important;
|
||||
}
|
||||
|
||||
.m-table__row--is_vip td {
|
||||
background-color: #ffff00 !important;
|
||||
color: #414a4c !important;
|
||||
}
|
||||
|
||||
.m-table__row--is_vip td > span,
|
||||
.m-table__row--is_vip td > span a,
|
||||
.m-table__row--is_vip td > span a i {
|
||||
color: #414a4c !important;
|
||||
}
|
||||
|
||||
.m-table__row--is_emergency td {
|
||||
background-color: #ffa500 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.m-table__row--is_emergency td > span,
|
||||
.m-table__row--is_emergency td > span a,
|
||||
.m-table__row--is_emergency td > span a i {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.m-datatable.m-datatable--default > .m-datatable__table {
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
|
@ -382,4 +358,4 @@ span.has-danger,
|
|||
|
||||
.map-info .m-badge {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
|
|
@ -1,74 +0,0 @@
|
|||
$(function() {
|
||||
// export table to csv
|
||||
$(document).on('click', '[data-export-csv]', async function(e) {
|
||||
const el = e.target.closest('[data-export-csv]');
|
||||
const oldLabel = el.innerHTML;
|
||||
|
||||
// set loading status
|
||||
el.disabled = true;
|
||||
el.innerHTML = 'Exporting...';
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append('datatable[pagination][page]', 1);
|
||||
formData.append('datatable[pagination][perpage]', 10000000);
|
||||
|
||||
// get all rows
|
||||
const response = await fetch(el.dataset.url, {
|
||||
method: el.dataset.method,
|
||||
body: formData,
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
if (response.status === 200) {
|
||||
// empty set returned
|
||||
if (parseInt(result.meta.total) === 0) {
|
||||
swal({
|
||||
title: 'Whoops',
|
||||
html: 'No data to export!',
|
||||
type: 'warning',
|
||||
});
|
||||
}
|
||||
|
||||
// build csv data
|
||||
const csvRows = [];
|
||||
const fieldList = el.dataset.fields.split(',');
|
||||
csvRows.push(el.dataset.headers);
|
||||
|
||||
result.data.forEach((row) => {
|
||||
const fieldData = [];
|
||||
fieldList.forEach((field) => {
|
||||
fieldData.push('"' + row[field] + '"');
|
||||
});
|
||||
|
||||
csvRows.push(fieldData.join(','));
|
||||
});
|
||||
|
||||
const csvData = csvRows.join('\n');
|
||||
|
||||
// build the csv file
|
||||
const csvFile = new Blob([csvData], {
|
||||
type: 'text/csv',
|
||||
});
|
||||
|
||||
// create a link to the file and download it
|
||||
const url = window.URL.createObjectURL(csvFile);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = el.dataset.filename + '.csv';
|
||||
a.click();
|
||||
} else {
|
||||
// something went wrong on the server
|
||||
swal({
|
||||
title: 'Whoops',
|
||||
html: 'An error has occurred while retrieving data.',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
|
||||
// remove loading status
|
||||
el.disabled = false;
|
||||
el.innerHTML = oldLabel;
|
||||
});
|
||||
});
|
||||
|
|
@ -3,14 +3,12 @@ class DashboardMap {
|
|||
this.options = options;
|
||||
this.rider_markers = rider_markers;
|
||||
this.cust_markers = cust_markers;
|
||||
this.rider_availability = {};
|
||||
|
||||
// layer groups
|
||||
this.layer_groups = {
|
||||
'rider_available': L.layerGroup(),
|
||||
'rider_active_jo': L.layerGroup(),
|
||||
'customer': L.layerGroup(),
|
||||
'mobile_customer': L.layerGroup(),
|
||||
'customer': L.layerGroup()
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -22,30 +20,17 @@ class DashboardMap {
|
|||
);
|
||||
|
||||
// add tile layer
|
||||
var streets = L.tileLayer('https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key={accessToken}',{
|
||||
tileSize: 512,
|
||||
zoomOffset: -1,
|
||||
minZoom: 1,
|
||||
attribution: '<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
crossOrigin: true,
|
||||
accessToken: this.options.access_token
|
||||
}).addTo(this.map);
|
||||
|
||||
/*
|
||||
// NOTE: this is for mapbox
|
||||
var streets = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
maxZoom: 18,
|
||||
id: 'mapbox/streets-v11',
|
||||
accessToken: this.options.access_token
|
||||
}).addTo(this.map);
|
||||
*/
|
||||
|
||||
// layer groups
|
||||
this.layer_groups.rider_available.addTo(this.map);
|
||||
this.layer_groups.rider_active_jo.addTo(this.map);
|
||||
this.layer_groups.customer.addTo(this.map);
|
||||
this.layer_groups.mobile_customer.addTo(this.map);
|
||||
|
||||
// base layer
|
||||
var baseMaps = {
|
||||
|
|
@ -57,8 +42,7 @@ class DashboardMap {
|
|||
var overlayMaps = {
|
||||
'Available Riders' : this.layer_groups.rider_available,
|
||||
'JO Riders' : this.layer_groups.rider_active_jo,
|
||||
'Customers' : this.layer_groups.customer,
|
||||
'Mobile Customers': this.layer_groups.mobile_customer
|
||||
'Customers' : this.layer_groups.customer
|
||||
}
|
||||
|
||||
L.control.layers(baseMaps, overlayMaps).addTo(this.map);
|
||||
|
|
@ -67,56 +51,6 @@ class DashboardMap {
|
|||
return this.map;
|
||||
}
|
||||
|
||||
switchRiderStatus(rider_id, rider_status) {
|
||||
console.log('switching rider ' + rider_id + ' to ' + rider_status);
|
||||
|
||||
// find the marker
|
||||
console.log(this.rider_markers);
|
||||
if (this.rider_markers.hasOwnProperty(rider_id)) {
|
||||
var marker = this.rider_markers[rider_id];
|
||||
} else {
|
||||
// TODO: call ajax to get location and create marker
|
||||
console.log('marker not found for rider');
|
||||
return true;
|
||||
}
|
||||
|
||||
// add it to proper layer group
|
||||
console.log(rider_status);
|
||||
if (rider_status == 'available') {
|
||||
this.layer_groups.rider_active_jo.removeLayer(marker);
|
||||
this.layer_groups.rider_available.addLayer(marker);
|
||||
marker.setIcon(this.options.icons.rider_available);
|
||||
} else if (rider_status == 'jo') {
|
||||
this.layer_groups.rider_available.removeLayer(marker);
|
||||
this.layer_groups.rider_active_jo.addLayer(marker);
|
||||
marker.setIcon(this.options.icons.rider_active_jo);
|
||||
}
|
||||
}
|
||||
|
||||
switchJobOrderOrigin(jo_id, jo_origin) {
|
||||
console.log('switching jo ' + jo_id + ' to ' + jo_origin);
|
||||
|
||||
// find the marker
|
||||
if (this.cust_markers.hasOwnProperty(jo_id)) {
|
||||
var marker = this.cust_markers[jo_id];
|
||||
} else {
|
||||
console.log('marker not found for customer');
|
||||
return true;
|
||||
}
|
||||
|
||||
// add marker to proper layer group
|
||||
console.log(jo_origin);
|
||||
if (jo_origin == 'mobile') {
|
||||
this.layer_groups.customer.removeLayer(marker);
|
||||
this.layer_groups.mobile_customer.addLayer(marker);
|
||||
marker.setIcon(this.options.icons.mobile_customer);
|
||||
} else {
|
||||
this.layer_groups.mobile_customer.removeLayer(marker);
|
||||
this.layer_groups.customer.addLayer(marker);
|
||||
marker.setIcon(this.options.icons.customer);
|
||||
}
|
||||
}
|
||||
|
||||
putMarker(id, lat, lng, markers, icon, layer_group, popup_url) {
|
||||
var my = this;
|
||||
// existing marker
|
||||
|
|
@ -142,7 +76,7 @@ class DashboardMap {
|
|||
$.get(url).done(function(data) {
|
||||
popup.setContent(data);
|
||||
popup.update();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +95,7 @@ class DashboardMap {
|
|||
|
||||
removeCustomerMarker(id) {
|
||||
console.log('removing customer marker for ' + id);
|
||||
var layer_group = this.layer_groups.customer;
|
||||
var markers = this.cust_markers;
|
||||
|
||||
// no customer marker with that id
|
||||
|
|
@ -169,20 +104,7 @@ class DashboardMap {
|
|||
return;
|
||||
}
|
||||
|
||||
this.layer_groups.customer.removeLayer(markers[id]);
|
||||
this.layer_groups.mobile_customer.removeLayer(markers[id]);
|
||||
}
|
||||
|
||||
putMobileCustomerMarker(id, lat, lng) {
|
||||
this.putMarker(
|
||||
id,
|
||||
lat,
|
||||
lng,
|
||||
this.cust_markers,
|
||||
this.options.icons.mobile_customer,
|
||||
this.layer_groups.mobile_customer,
|
||||
this.options.cust_popup_url
|
||||
);
|
||||
layer_group.removeLayer(markers[id]);
|
||||
}
|
||||
|
||||
putRiderAvailableMarker(id, lat, lng) {
|
||||
|
|
@ -209,19 +131,6 @@ class DashboardMap {
|
|||
);
|
||||
}
|
||||
|
||||
removeRiderMarker(id) {
|
||||
console.log('removing rider marker for ' + id);
|
||||
var markers = this.rider_markers;
|
||||
|
||||
if (!markers.hasOwnProperty(id)) {
|
||||
console.log('no such marker to remove');
|
||||
return;
|
||||
}
|
||||
|
||||
this.layer_groups.rider_active_jo.removeLayer(markers[id]);
|
||||
this.layer_groups.rider_available.removeLayer(markers[id]);
|
||||
}
|
||||
|
||||
loadLocations(location_url) {
|
||||
console.log(this.rider_markers);
|
||||
var my = this;
|
||||
|
|
@ -232,7 +141,6 @@ class DashboardMap {
|
|||
my.layer_groups.rider_available.clearLayers();
|
||||
my.layer_groups.rider_active_jo.clearLayers();
|
||||
my.layer_groups.customer.clearLayers();
|
||||
my.layer_groups.mobile_customer.clearLayers();
|
||||
|
||||
// get riders and job orders
|
||||
var riders = response.riders;
|
||||
|
|
@ -243,10 +151,7 @@ class DashboardMap {
|
|||
var lat = data.latitude;
|
||||
var lng = data.longitude;
|
||||
|
||||
if (data.is_mobile)
|
||||
my.putMobileCustomerMarker(id, lat, lng);
|
||||
else
|
||||
my.putCustomerMarker(id, lat, lng);
|
||||
my.putCustomerMarker(id, lat, lng);
|
||||
});
|
||||
|
||||
// riders
|
||||
|
|
@ -254,13 +159,10 @@ class DashboardMap {
|
|||
var lat = data.latitude;
|
||||
var lng = data.longitude;
|
||||
|
||||
if (data.has_jo) {
|
||||
my.rider_availability[id] = false;
|
||||
if (data.has_jo)
|
||||
my.putRiderActiveJOMarker(id, lat, lng);
|
||||
} else {
|
||||
my.rider_availability[id] = true;
|
||||
else
|
||||
my.putRiderAvailableMarker(id, lat, lng);
|
||||
}
|
||||
});
|
||||
|
||||
// console.log(rider_markers);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
class MapEventHandler {
|
||||
constructor(options, dashmap, ssl) {
|
||||
constructor(options, dashmap) {
|
||||
this.options = options;
|
||||
this.dashmap = dashmap;
|
||||
this.ssl = ssl;
|
||||
}
|
||||
|
||||
connect(user_id, host, port) {
|
||||
|
|
@ -12,7 +11,7 @@ class MapEventHandler {
|
|||
|
||||
this.mqtt = new Paho.MQTT.Client(host, port, client_id);
|
||||
var options = {
|
||||
useSSL: this.ssl,
|
||||
// useSSL: true,
|
||||
timeout: 3,
|
||||
invocationContext: this,
|
||||
onSuccess: this.onConnect.bind(this),
|
||||
|
|
@ -28,34 +27,18 @@ class MapEventHandler {
|
|||
console.log('mqtt connected!');
|
||||
var my = icontext.invocationContext;
|
||||
|
||||
// subscribe to rider locations
|
||||
if (my.options.track_rider) {
|
||||
// subscribe to rider locations
|
||||
console.log('subscribing to ' + my.options.channels.rider_location);
|
||||
my.mqtt.subscribe(my.options.channels.rider_location);
|
||||
|
||||
// subscribe to rider status
|
||||
console.log('subscribing to ' + my.options.channels.rider_status);
|
||||
my.mqtt.subscribe(my.options.channels.rider_status);
|
||||
|
||||
// subscribe to rider availability
|
||||
console.log('subscribing to ' + my.options.channels.rider_availability);
|
||||
my.mqtt.subscribe(my.options.channels.rider_availability);
|
||||
}
|
||||
|
||||
// subscribe to jo locations
|
||||
if (my.options.track_jo) {
|
||||
// subscribe to jo locations
|
||||
console.log('subscribing to ' + my.options.channels.jo_location);
|
||||
my.mqtt.subscribe(my.options.channels.jo_location);
|
||||
|
||||
// subscribe to jo status
|
||||
console.log('subscribing to ' + my.options.channels.jo_status);
|
||||
my.mqtt.subscribe(my.options.channels.jo_status);
|
||||
|
||||
// subscribe to jo origin
|
||||
console.log('subscribing to ' + my.options.channels.jo_origin);
|
||||
my.mqtt.subscribe(my.options.channels.jo_origin);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onMessage(msg) {
|
||||
|
|
@ -78,12 +61,12 @@ class MapEventHandler {
|
|||
}
|
||||
|
||||
handleRider(chan_split, payload) {
|
||||
//console.log("rider message");
|
||||
console.log("rider message");
|
||||
switch (chan_split[2]) {
|
||||
case "location":
|
||||
console.log("got location for rider " + chan_split[1] + " - " + payload);
|
||||
var pl_split = payload.split(':');
|
||||
// console.log(pl_split);
|
||||
console.log(pl_split);
|
||||
|
||||
// check for correct format
|
||||
if (pl_split.length != 2)
|
||||
|
|
@ -92,62 +75,8 @@ class MapEventHandler {
|
|||
var lat = parseFloat(pl_split[0]);
|
||||
var lng = parseFloat(pl_split[1]);
|
||||
|
||||
// TODO: check if available or not
|
||||
this.dashmap.putRiderAvailableMarker(chan_split[1], lat, lng);
|
||||
break;
|
||||
case "status":
|
||||
console.log("got status for rider " + chan_split[1] + " - " + payload);
|
||||
switch (payload) {
|
||||
case 'available':
|
||||
this.dashmap.switchRiderStatus(chan_split[1], 'available');
|
||||
break;
|
||||
case 'jo':
|
||||
console.log('jo status');
|
||||
this.dashmap.switchRiderStatus(chan_split[1], 'jo');
|
||||
break;
|
||||
case 'logout':
|
||||
this.dashmap.removeRiderMarker(chan_split[1]);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "availability":
|
||||
console.log("got availability for rider " + chan_split[1] + " - " + payload);
|
||||
var obj = JSON.parse(payload);
|
||||
|
||||
var status = obj.status;
|
||||
// console.log("status " + status);
|
||||
switch (status) {
|
||||
case 'rider_offline':
|
||||
this.dashmap.rider_availability[chan_split[1]] = false;
|
||||
this.dashmap.removeRiderMarker(chan_split[1]);
|
||||
break;
|
||||
case 'rider_online':
|
||||
this.dashmap.rider_availability[chan_split[1]] = true;
|
||||
var lat = parseFloat(obj.latitude);
|
||||
var lng = parseFloat(obj.longitude);
|
||||
|
||||
// check if rider is available / unavailable
|
||||
var dashmap = this.dashmap;
|
||||
var url = dashmap.options.rider_availability_url;
|
||||
var rider_availability_url = url.replace('[id]', chan_split[1]);
|
||||
$.get(rider_availability_url).done(function(data) {
|
||||
console.log('rider availability - ' + data);
|
||||
switch (data) {
|
||||
case 'available':
|
||||
console.log('putting available marker ' + chan_split[1] + ' ' + lat + ':' + lng);
|
||||
dashmap.switchRiderStatus(chan_split[1], 'available');
|
||||
dashmap.putRiderAvailableMarker(chan_split[1], lat, lng);
|
||||
break;
|
||||
case 'unavailable':
|
||||
console.log('putting active jo marker ' + chan_split[1] + ' ' + lat + ':' + lng);
|
||||
dashmap.switchRiderStatus(chan_split[1], 'jo');
|
||||
dashmap.putRiderActiveJOMarker(chan_split[1], lat, lng);
|
||||
break;
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +102,6 @@ class MapEventHandler {
|
|||
this.dashmap.putCustomerMarker(id, lat, lng);
|
||||
break;
|
||||
case "status":
|
||||
console.log("got status for jo " + payload);
|
||||
switch (payload) {
|
||||
case 'cancel':
|
||||
case 'fulfill':
|
||||
|
|
@ -181,14 +109,6 @@ class MapEventHandler {
|
|||
this.dashmap.removeCustomerMarker(id);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "origin":
|
||||
console.log("got origin for jo " + payload);
|
||||
if (payload == 'mobile_app')
|
||||
{
|
||||
this.dashmap.switchJobOrderOrigin(chan_split[1], 'mobile');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
public/battery/enduro_mobile.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
BIN
public/battery/excel_mobile.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
BIN
public/battery/gold_mobile.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">Can I request for any Res-Q service if I don't have or have a weak data signal?
|
||||
</h2>
|
||||
<p>Res-Q needs a stable data connection for you to be able to request for a service and track the location of our rider. If you don't have a stable data connection, you may call our hotline at (02) 8370-6686.
|
||||
<p>Res-Q needs a stable data connection for you to be able to request for a service and track the location of our rider. If you don't have a stable data connection, you may call our hotline at (02) 370-6686.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
@ -58,13 +58,7 @@ Yes, we accept Visa and Mastercard issued in the Philippines.
|
|||
How can I pay for your services/ products?
|
||||
</h2>
|
||||
<p>
|
||||
We accept COD, local credit cards, debit cards, and ATM cards for battery replacement transactions. We only accept cash payment for flat tire, refuel and overheat transactions.
|
||||
</p>
|
||||
<p>
|
||||
Credit Card and Debit Card Payment is for Battery Sales only.
|
||||
</p>
|
||||
<p>
|
||||
Cash only for services request.
|
||||
We accept COD, local Credit Cards, Debit Cards, and ATM Cards only.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
@ -78,7 +72,7 @@ Once you have successfully submitted your request, you will be able to see the p
|
|||
How do I make a follow up for my order/service?
|
||||
</h2>
|
||||
<p>
|
||||
Once your order/ service has been assigned to a Technician Rider, you may be able to see his/her contact details in the App. If no Technician Rider has been assigned yet, you may call our hotline at (02) 8370-6686.
|
||||
Once your order/ service has been assigned to a Technician Rider, you may be able to see his/her contact details in the App. If no Technician Rider has been assigned yet, you may call our hotline at (02) 370-6686.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
@ -99,14 +93,14 @@ Delivery for battery purchase is free of charge.
|
|||
Can you deliver anywhere in the Philippines?
|
||||
</h2>
|
||||
<p>
|
||||
Not yet. Res-Q is offered Metro Manila, Baguio City and Binan, Laguna only.
|
||||
Not yet. Res-Q is offered initially in Metro Manila only.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
My battery was pulled out and is being recharged in an outlet. How do I follow-up when I can take my battery back?
|
||||
</h2>
|
||||
<p>
|
||||
Please call our hotline at (02) 8370-6686.
|
||||
Please call our hotline at (02) 370-6686.
|
||||
</p>
|
||||
|
||||
|
||||
|
|
@ -115,7 +109,7 @@ Please call our hotline at (02) 8370-6686.
|
|||
How do I contact you for questions or feedback?
|
||||
</h2>
|
||||
<p>
|
||||
You may call our Customer Support Hotline: 02-83706686 or email us at online@motolite.com.
|
||||
You may call our Customer Support Hotline: 02-3706686 or email us at online@motolite.com.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Yes, we accept Visa and Mastercard issued in the Philippines.
|
|||
How can I pay for your services/ products?
|
||||
</h2>
|
||||
<p>
|
||||
We accept COD, local credit cards, debit cards, and ATM cards for battery replacement transactions. We only accept cash payment for flat tire, refuel and overheat transactions.
|
||||
We accept COD, local Credit Cards, Debit Cards, and ATM Cards only.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
@ -93,7 +93,7 @@ Delivery for battery purchase is free of charge.
|
|||
Can you deliver anywhere in the Philippines?
|
||||
</h2>
|
||||
<p>
|
||||
Not yet. Res-Q is offered Metro Manila, Baguio City and Binan, Laguna only.
|
||||
Not yet. Res-Q is offered initially in Metro Manila only.
|
||||
</p>
|
||||
|
||||
<h2 style="font-weight: bold; font-size: 40px;">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,5 @@ class AdjustLongLatCommand extends Command
|
|||
}
|
||||
|
||||
$em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,5 @@ class ComputeWarrantyExpiryDateCommand extends Command
|
|||
|
||||
$this->em->clear();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use App\Entity\WarrantySerialQueue;
|
||||
|
||||
class CountTotalPendingWarrantySerialFilesCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('warrantyserial:count')
|
||||
->setDescription('Count number of pending warranty serial files.')
|
||||
->setHelp('Count number of pending warranty serial files.');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$em = $this->em;
|
||||
|
||||
$status = 'pending';
|
||||
|
||||
$db = $em->getConnection();
|
||||
|
||||
$ws_query_sql = 'SELECT COUNT(*) AS total FROM warranty_serial_queue
|
||||
WHERE status = :status';
|
||||
|
||||
$ws_query_stmt = $db->prepare($ws_query_sql);
|
||||
$ws_query_stmt->bindValue('status', $status);
|
||||
|
||||
$ws_results = $ws_query_stmt->executeQuery();
|
||||
|
||||
$results = $ws_results->fetchAssociative();
|
||||
|
||||
$output->write($results['total']);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -216,8 +216,7 @@ class CreateCustomerFromWarrantyCommand extends Command
|
|||
$new_cust = new Customer();
|
||||
$new_cust->setFirstName($w_first_name)
|
||||
->setLastName($w_last_name)
|
||||
->setPhoneMobile($w_mobile_num)
|
||||
->setCreateSource('CMB_CreateCustomerFromWarranty');
|
||||
->setPhoneMobile($w_mobile_num);
|
||||
|
||||
$this->em->persist($new_cust);
|
||||
|
||||
|
|
@ -291,8 +290,6 @@ class CreateCustomerFromWarrantyCommand extends Command
|
|||
//$output->writeln('Total warranties with no mobile number: ' . $total_inv_warr);
|
||||
$output->writeln('Total customers added: ' . $total_cust_added);
|
||||
$output->writeln('Total customer vehicles added: ' . $total_cv_added);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function getDefaultVehicle()
|
||||
|
|
|
|||
|
|
@ -1,92 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use App\Entity\ApiUser as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\Role as APIRole;
|
||||
|
||||
use App\Entity\Rider;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class CreateRiderAPIUserCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:user-create-for-rider')
|
||||
->setDescription('Create API users for existing riders.')
|
||||
->setHelp('Creates API users for existing riders.')
|
||||
->addArgument('role_id', InputArgument::REQUIRED, 'Role ID for api_user.');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
error_log('Creating api users...');
|
||||
// get all existing riders
|
||||
$riders = $this->em->getRepository(Rider::class)->findAll();
|
||||
|
||||
// get role for rider api user
|
||||
$role_id = $input->getArgument('role_id');
|
||||
$role = $this->em->getRepository(APIRole::class)->find($role_id);
|
||||
if ($role == null)
|
||||
{
|
||||
error_log('Cannot find role with id ' . $role_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach ($riders as $rider)
|
||||
{
|
||||
// skip riders who already have users
|
||||
if ($rider->getAPIUser() != null)
|
||||
continue;
|
||||
|
||||
// create api user for each rider
|
||||
// no need to generate the keys.
|
||||
// Secret and API keys are generated in constructor
|
||||
$api_user = new APIUser();
|
||||
|
||||
// set enabled to true
|
||||
$api_user->setEnabled(true);
|
||||
|
||||
// set name to rider's last name + first name
|
||||
$rider_name = $rider->getFirstName() . ' ' . $rider->getLastName();
|
||||
$api_user->setName($rider_name);
|
||||
|
||||
// set rider to api_user
|
||||
$api_user->setRider($rider);
|
||||
|
||||
// set meta
|
||||
$meta = ['rider_id' => $rider->getID()];
|
||||
$api_user->setMetaData($meta);
|
||||
|
||||
// set role
|
||||
$api_user->addRole($role);
|
||||
|
||||
// set rider's api user
|
||||
$rider->setAPIUser($api_user);
|
||||
|
||||
$this->em->persist($api_user);
|
||||
}
|
||||
|
||||
$this->em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,9 +22,9 @@ class FulfillOldJobOrderCommand extends Command
|
|||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
public function __construct(EntityManagerInterface $om)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->em = $om;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
@ -76,7 +76,5 @@ class FulfillOldJobOrderCommand extends Command
|
|||
}
|
||||
|
||||
$em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,529 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use App\Entity\JobOrder;
|
||||
use App\Entity\JOEvent;
|
||||
use App\Entity\User;
|
||||
use App\Entity\Warranty;
|
||||
use App\Entity\SAPBattery;
|
||||
|
||||
use App\Ramcar\JOStatus;
|
||||
use App\Ramcar\JOEventType;
|
||||
use App\Ramcar\DeliveryStatus;
|
||||
use App\Ramcar\WarrantyClass;
|
||||
use App\Ramcar\ServiceType;
|
||||
use App\Ramcar\WarrantySource;
|
||||
use App\Ramcar\WarrantyStatus;
|
||||
|
||||
use DateTime;
|
||||
use DateInterval;
|
||||
|
||||
class FulfillOpenJobOrderCommand extends Command
|
||||
{
|
||||
const DEFAULT_SAP_WARRANTY = 12;
|
||||
const JO_BATCH_CTR = 200;
|
||||
|
||||
protected $em;
|
||||
protected $batt_hash;
|
||||
protected $sap_batt_hash;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('joborder:fulfillopenjosnosms')
|
||||
->setDescription('Fulfill open job orders without sending an SMS message.')
|
||||
->setHelp('Mark open job orders as fulfilled and should not send a SMS message. Date format: YYYY-MM-DD')
|
||||
->addArgument('end_date', InputArgument::REQUIRED, 'End date. Format: YYYY-MM-DD');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
// load batteries into hash
|
||||
$this->populateBatteryIndex();
|
||||
|
||||
// load sap batteries into hash
|
||||
$this->populateSAPBatteryIndex();
|
||||
|
||||
// get the input date
|
||||
$str_date_end = $input->getArgument('end_date');
|
||||
|
||||
// append the 23:59:59 to end date
|
||||
$str_date_end = $str_date_end . ' ' . '23:59:59';
|
||||
|
||||
// starting time to count is date schedule
|
||||
$date_end = new DateTime($str_date_end);
|
||||
|
||||
// get current date and convert to string
|
||||
$current_date = new DateTime();
|
||||
$str_current_date = $current_date->format('Y-m-d H:i:s');
|
||||
|
||||
// find all open job orders starting from input date and before
|
||||
// need to get customer id, customer vehicle id, service type, warranty class
|
||||
$conn = $this->em->getConnection();
|
||||
|
||||
$jo_sql = 'SELECT jo.id AS jo_id, c.id AS c_id, cv.id AS cv_id,
|
||||
jo.service_type, jo.warranty_class, jo.rider_id, jo.date_schedule
|
||||
FROM job_order jo, customer c, customer_vehicle cv
|
||||
WHERE jo.customer_id = c.id AND jo.cvehicle_id = cv.id
|
||||
AND jo.status IN (\'pending\', \'rider_assign\', \'assigned\', \'in_transit\', \'in_progress\')
|
||||
AND jo.date_schedule <= :date_end';
|
||||
$stmt = $conn->prepare($jo_sql);
|
||||
$stmt->execute([
|
||||
'date_end' => $str_date_end]);
|
||||
|
||||
$jo_results = $stmt->fetchAll();
|
||||
|
||||
error_log('JOs found ' . count($jo_results));
|
||||
|
||||
$total_jos = count($jo_results);
|
||||
|
||||
$jo_ctr = 0;
|
||||
$update_jo_ctr = 0;
|
||||
$update_wheres = [];
|
||||
$w_data = [];
|
||||
$jo_evt_data = [];
|
||||
|
||||
foreach ($jo_results as $jo_row)
|
||||
{
|
||||
// get the data first
|
||||
$jo_id = $jo_row['jo_id'];
|
||||
$cust_id = $jo_row['c_id'];
|
||||
$cv_id = $jo_row['cv_id'];
|
||||
$service_type = $jo_row['service_type'];
|
||||
$warranty_class = $jo_row['warranty_class'];
|
||||
$rider_id = $jo_row['rider_id'];
|
||||
$str_date_schedule = $jo_row['date_schedule'];
|
||||
|
||||
$jo_ctr++;
|
||||
|
||||
// fulfill JO
|
||||
$this->fulfillJO($conn, $jo_id, $update_jo_ctr, $update_wheres, $jo_ctr, $total_jos);
|
||||
|
||||
// create JO event
|
||||
$jo_evt_data[] = $this->createJOEvent($conn, $jo_id, $str_current_date, $rider_id);
|
||||
|
||||
// error_log($jo_ctr . ' Processing JO ' . $jo_id);
|
||||
|
||||
// check service type
|
||||
if ($service_type == ServiceType::BATTERY_REPLACEMENT_NEW)
|
||||
{
|
||||
// new battery so we need to create warranty so we need to get battery id from invoice
|
||||
$batt_id = $this->getBatteryInformation($conn, $jo_id);
|
||||
|
||||
if (($batt_id != null) && (isset($this->batt_hash[$batt_id])))
|
||||
$w_data[] = $this->createWarrantyForJO($conn, $current_date, $str_date_schedule, $cust_id, $cv_id, $warranty_class, $batt_id);
|
||||
}
|
||||
}
|
||||
|
||||
// load data file for jo event
|
||||
$this->createLoadDataFileForJOEvent($jo_evt_data);
|
||||
|
||||
// load data file for warranty
|
||||
$this->createLoadDataFileForWarranty($w_data);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
protected function fulfillJO($conn, $jo_id, &$update_jo_ctr, &$update_wheres, $jo_ctr, $total_jos)
|
||||
{
|
||||
$update_wheres[] = 'id = ' . $jo_id;
|
||||
|
||||
// update db when we reach max # of JOs or when we reach total number of jos
|
||||
if (($update_jo_ctr == self::JO_BATCH_CTR) ||
|
||||
($jo_ctr == $total_jos))
|
||||
{
|
||||
error_log('Processing ' . $update_jo_ctr . ' job orders...');
|
||||
|
||||
$update_where_string = implode(' OR ' , $update_wheres);
|
||||
|
||||
// update job order
|
||||
$fulfill_jo_sql = 'UPDATE job_order SET status = :fulfilled, delivery_status = :del_fulfilled WHERE ' . $update_where_string;
|
||||
|
||||
// error_log($fulfill_jo_sql);
|
||||
|
||||
$fulfill_jo_stmt = $conn->prepare($fulfill_jo_sql);
|
||||
$fulfill_jo_stmt->execute([
|
||||
'fulfilled' => JOStatus::FULFILLED,
|
||||
'del_fulfilled' => DeliveryStatus::FULFILLED,
|
||||
]);
|
||||
|
||||
// reset the wheres string
|
||||
$update_wheres = [];
|
||||
|
||||
// reset the update jo counter
|
||||
$update_jo_ctr = 0;
|
||||
}
|
||||
else
|
||||
$update_jo_ctr++;
|
||||
}
|
||||
|
||||
protected function createJOEvent($conn, $jo_id, $str_current_date, $rider_id)
|
||||
{
|
||||
// create jo event
|
||||
// set user to admin that has id of 1
|
||||
$user_id = 1;
|
||||
|
||||
$r_id = '\N';
|
||||
// check if rider is null
|
||||
if ($rider_id != NULL)
|
||||
$r_id = $rider_id;
|
||||
|
||||
// create array for the jo event
|
||||
$data = [
|
||||
$user_id,
|
||||
$jo_id,
|
||||
$str_current_date,
|
||||
$str_current_date,
|
||||
JOEventType::FULFILL,
|
||||
$r_id,
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getBatteryInformation($conn, $jo_id)
|
||||
{
|
||||
// break this down into two sql calls
|
||||
// get the invoice for job order
|
||||
$i_sql = 'SELECT i.id FROM invoice i
|
||||
WHERE i.job_order_id = :jo_id';
|
||||
$i_stmt = $conn->prepare($i_sql);
|
||||
$i_stmt->execute([
|
||||
'jo_id' => $jo_id,
|
||||
]);
|
||||
|
||||
$i_result = $i_stmt->fetch();
|
||||
|
||||
// check if invoice exists
|
||||
if (empty($i_result))
|
||||
return null;
|
||||
|
||||
$invoice_id = $i_result['id'];
|
||||
|
||||
// get the battery id from invoice item
|
||||
$ii_sql = 'SELECT ii.battery_id FROM invoice_item ii
|
||||
WHERE ii.invoice_id = :invoice_id
|
||||
AND ii.battery_id IS NOT NULL';
|
||||
$ii_stmt = $conn->prepare($ii_sql);
|
||||
$ii_stmt->execute([
|
||||
'invoice_id' => $invoice_id,
|
||||
]);
|
||||
|
||||
$ii_result = $ii_stmt->fetch();
|
||||
|
||||
// checking for result
|
||||
if (empty($ii_result))
|
||||
return null;
|
||||
|
||||
$batt_id = $ii_result['battery_id'];
|
||||
|
||||
return $batt_id;
|
||||
}
|
||||
|
||||
protected function createWarrantyForJO($conn, $current_date, $str_date_schedule, $cust_id, $cv_id, $warranty_class, $batt_id)
|
||||
{
|
||||
// convert current date to string since we use this for date_create
|
||||
$str_current_date = $current_date->format('Y-m-d H:i:s');
|
||||
|
||||
// get the warranty period based on warranty class from battery hash
|
||||
$warranty_period = $this->getWarrantyPeriod($batt_id, $warranty_class);
|
||||
|
||||
// compute date expiry.
|
||||
// convert to DateTime date schedule
|
||||
$date_schedule = DateTime::createFromFormat('Y-m-d H:i:s', $str_date_schedule);
|
||||
$date_expire = $this->computeDateExpire($date_schedule, $warranty_period);
|
||||
|
||||
// convert to string the expiry date
|
||||
$str_date_expire = $date_expire->format('Y-m-d');
|
||||
|
||||
// convert date schedule to just date
|
||||
$str_date_purchase = $date_schedule->format('Y-m-d');
|
||||
|
||||
// check if date_expire is after or equal to the current date
|
||||
// if so, set warranty status to active
|
||||
$warranty_status = WarrantyStatus::EXPIRED;
|
||||
if ($date_expire >= $current_date)
|
||||
$warranty_status = WarrantyStatus::ACTIVE;
|
||||
|
||||
// get customer
|
||||
$cust_info = $this->getCustomerInfo($conn, $cust_id);
|
||||
|
||||
// get customer vehicle
|
||||
$cv_info = $this->getCustomerVehicleInfo($conn, $cv_id);
|
||||
|
||||
// customer info
|
||||
$first_name = addslashes($cust_info['first_name']);
|
||||
$last_name = addslashes($cust_info['last_name']);
|
||||
$mobile = addslashes($cust_info['mobile']);
|
||||
|
||||
// customer vehicle info
|
||||
$plate_number = $cv_info['plate_number'];
|
||||
$vehicle_id = $cv_info['vehicle_id'];
|
||||
|
||||
// battery info
|
||||
$model_id = $this->batt_hash[$batt_id]['model_id'];
|
||||
$size_id = $this->batt_hash[$batt_id]['size_id'];
|
||||
// need to confirm that sap_code exists in sap_battery
|
||||
if (isset($this->sap_batt_hash['sap_code']))
|
||||
$sap_code = $this->batt_hash[$batt_id]['sap_code'];
|
||||
else
|
||||
$sap_code = '\N';
|
||||
|
||||
// set flag_activated to false since that's the default in Warranty's constructor
|
||||
$flag_activated = false;
|
||||
|
||||
// create array for the infile
|
||||
$warranty_data = [
|
||||
$model_id,
|
||||
$size_id,
|
||||
$sap_code,
|
||||
$warranty_class,
|
||||
$plate_number,
|
||||
$warranty_status,
|
||||
$str_current_date,
|
||||
$str_date_purchase,
|
||||
$str_date_expire,
|
||||
$first_name,
|
||||
$last_name,
|
||||
$mobile,
|
||||
$flag_activated,
|
||||
$vehicle_id,
|
||||
$cust_id,
|
||||
WarrantySource::ADMIN_PANEL,
|
||||
];
|
||||
|
||||
return $warranty_data;
|
||||
}
|
||||
|
||||
protected function createLoadDataFileForWarranty($warranty_data)
|
||||
{
|
||||
// cache directory
|
||||
$cache_dir = __DIR__ . '/../../var/cache';
|
||||
|
||||
$file = $cache_dir . '/warranty_data.tab';
|
||||
error_log('opening file for warranty - ' . $file);
|
||||
|
||||
$fp = fopen($file, 'w');
|
||||
if ($fp === false)
|
||||
{
|
||||
error_log('could not open file for load data infile - ' . $file);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($warranty_data as $key => $data)
|
||||
{
|
||||
$line = implode('|', $data) . "\r\n";
|
||||
fwrite($fp, $line);
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
error_log('Loading warranty data');
|
||||
$conn = $this->em->getConnection();
|
||||
$stmt = $conn->prepare('LOAD DATA LOCAL INFILE \'' . $file . '\' INTO TABLE warranty FIELDS TERMINATED BY \'|\' LINES TERMINATED BY \'\\r\\n\' (bty_model_id,bty_size_id,sap_bty_id,warranty_class,plate_number,status,date_create,date_purchase,date_expire,first_name,last_name,mobile_number,flag_activated,vehicle_id,customer_id, create_source)');
|
||||
$result = $stmt->execute();
|
||||
if (!$result)
|
||||
error_log('Failed loading data.');
|
||||
|
||||
// TODO: delete file?
|
||||
}
|
||||
|
||||
protected function createLoadDataFileForJOEvent($jo_evt_data)
|
||||
{
|
||||
// cache directory
|
||||
$cache_dir = __DIR__ . '/../../var/cache';
|
||||
|
||||
$file = $cache_dir . '/jo_event_data.tab';
|
||||
error_log('opening file for jo_event - ' . $file);
|
||||
|
||||
$fp = fopen($file, 'w');
|
||||
if ($fp === false)
|
||||
{
|
||||
error_log('could not open file for load data infile - ' . $file);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($jo_evt_data as $key => $data)
|
||||
{
|
||||
$line = implode('|', $data) . "\r\n";
|
||||
fwrite($fp, $line);
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
error_log('Loading jo event data');
|
||||
$conn = $this->em->getConnection();
|
||||
$stmt = $conn->prepare('LOAD DATA LOCAL INFILE \'' . $file . '\' INTO TABLE jo_event FIELDS TERMINATED BY \'|\' LINES TERMINATED BY \'\\r\\n\' (create_user_id, job_order_id, date_create, date_happen, type_id, rider_id)');
|
||||
$result = $stmt->execute();
|
||||
if (!$result)
|
||||
error_log('Failed loading data.');
|
||||
|
||||
// TODO: delete file?
|
||||
}
|
||||
|
||||
protected function getCustomerInfo($conn, $id)
|
||||
{
|
||||
$cust_info = [];
|
||||
|
||||
$cust_sql = 'SELECT c.first_name, c.last_name, c.phone_mobile
|
||||
FROM customer c
|
||||
WHERE c.id = :id';
|
||||
$cust_stmt = $conn->prepare($cust_sql);
|
||||
$cust_stmt->execute([
|
||||
'id' => $id,
|
||||
]);
|
||||
|
||||
$cust_result = $cust_stmt->fetch();
|
||||
|
||||
$cust_info = [
|
||||
'first_name' => $cust_result['first_name'],
|
||||
'last_name' => $cust_result['last_name'],
|
||||
'mobile' => $cust_result['phone_mobile'],
|
||||
];
|
||||
|
||||
return $cust_info;
|
||||
}
|
||||
|
||||
protected function getCustomerVehicleInfo($conn, $id)
|
||||
{
|
||||
$cv_info = [];
|
||||
|
||||
$cv_sql = 'SELECT cv.plate_number, cv.vehicle_id
|
||||
FROM customer_vehicle cv
|
||||
WHERE cv.id = :id';
|
||||
$cv_stmt = $conn->prepare($cv_sql);
|
||||
$cv_stmt->execute([
|
||||
'id' => $id,
|
||||
]);
|
||||
|
||||
$cv_result = $cv_stmt->fetch();
|
||||
|
||||
$plate_number = $cv_result['plate_number'];
|
||||
|
||||
$clean_plate = $this->cleanPlateNumber($plate_number);
|
||||
|
||||
$cv_info = [
|
||||
'plate_number' => $clean_plate,
|
||||
'vehicle_id' => $cv_result['vehicle_id'],
|
||||
];
|
||||
|
||||
return $cv_info;
|
||||
}
|
||||
|
||||
protected function getWarrantyPeriod($batt_id, $warranty_class)
|
||||
{
|
||||
// set default period to that of private
|
||||
$period = $this->batt_hash[$batt_id]['warr_private'];
|
||||
|
||||
if ($warranty_class == WarrantyClass::WTY_PRIVATE)
|
||||
{
|
||||
$period = $this->batt_hash[$batt_id]['warr_private'];
|
||||
return $period;
|
||||
}
|
||||
if ($warranty_class == WarrantyClass::WTY_COMMERCIAL)
|
||||
{
|
||||
$period = $this->batt_hash[$batt_id]['warr_commercial'];
|
||||
return $period;
|
||||
}
|
||||
if ($warranty_class == WarrantyClass::WTY_TNV)
|
||||
{
|
||||
$period = $this->batt_hash[$batt_id]['warr_tnv'];
|
||||
return $period;
|
||||
}
|
||||
|
||||
return $period;
|
||||
}
|
||||
|
||||
protected function computeDateExpire($purchase_date, $warranty_period)
|
||||
{
|
||||
$expire_date = clone $purchase_date;
|
||||
$expire_date->add(new DateInterval('P'.$warranty_period.'M'));
|
||||
return $expire_date;
|
||||
}
|
||||
|
||||
protected function cleanPlateNumber($plate)
|
||||
{
|
||||
// trim plate number down to 20 characters
|
||||
$trim_plate = str_replace(' ','', $plate);
|
||||
|
||||
// truncate plate number down to 20 (max length)
|
||||
$trunc_plate = substr($trim_plate, 0, 20);
|
||||
|
||||
return strtoupper($trunc_plate);
|
||||
}
|
||||
|
||||
protected function populateBatteryIndex()
|
||||
{
|
||||
$conn = $this->em->getConnection();
|
||||
|
||||
// get all the batteries
|
||||
$sql = 'SELECT b.id, b.model_id, b.size_id, b.sap_code, b.warr_private, b.warr_commercial, b.warr_tnv
|
||||
FROM battery b';
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
$results = $stmt->fetchAll();
|
||||
|
||||
// go through the rows
|
||||
foreach ($results as $row)
|
||||
{
|
||||
// breaking this down for clarity
|
||||
$battery_id = $row['id'];
|
||||
$model_id = $row['model_id'];
|
||||
$size_id = $row['size_id'];
|
||||
$sap_code = trim($row['sap_code']);
|
||||
$warr_private = $row['warr_private'];
|
||||
$warr_commercial = $row['warr_commercial'];
|
||||
$warr_tnv = $row['warr_tnv'];
|
||||
|
||||
$this->batt_hash[$battery_id] = [
|
||||
'sap_code' => $sap_code,
|
||||
'model_id' => $model_id,
|
||||
'size_id' => $size_id,
|
||||
'warr_private' => $warr_private,
|
||||
'warr_commercial' => $warr_commercial,
|
||||
'warr_tnv' => $warr_tnv,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
protected function populateSAPBatteryIndex()
|
||||
{
|
||||
$conn = $this->em->getConnection();
|
||||
|
||||
// get all the sap batteries
|
||||
$sql = 'SELECT sap.id, sap.brand_id, sap.size_id FROM sap_battery sap';
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
$results = $stmt->fetchAll();
|
||||
|
||||
// go through the rows
|
||||
foreach ($results as $row)
|
||||
{
|
||||
// set warranty period to default warranty period for SAP batteries
|
||||
$this->sap_batt_hash[$row['id']] = [
|
||||
'sap_brand' => $row['brand_id'],
|
||||
'sap_size' => $row['size_id'],
|
||||
'warranty' => self::DEFAULT_SAP_WARRANTY,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,9 +22,9 @@ class FulfillPendingJobOrderCommand extends Command
|
|||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
public function __construct(EntityManagerInterface $om)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->em = $om;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
@ -79,7 +79,5 @@ class FulfillPendingJobOrderCommand extends Command
|
|||
}
|
||||
|
||||
$em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ class GenerateBatteryCompatibilityCommand extends Command
|
|||
protected $em;
|
||||
protected $vmfg_index;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
public function __construct(EntityManagerInterface $om)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->em = $om;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ class GenerateBatteryCompatibilityCommand extends Command
|
|||
$vehicles = $vm->getVehicles();
|
||||
foreach ($vehicles as $vehicle)
|
||||
{
|
||||
$batteries = $vehicle->getActiveBatteries();
|
||||
$batteries = $vehicle->getBatteries();
|
||||
$comp_batt = [];
|
||||
foreach ($batteries as $battery)
|
||||
{
|
||||
|
|
@ -100,7 +100,5 @@ class GenerateBatteryCompatibilityCommand extends Command
|
|||
fwrite($json_file, json_encode($this->vmfg_index, JSON_PRETTY_PRINT));
|
||||
fclose($json_file);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,140 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Entity\CustomerVehicle;
|
||||
use App\Entity\VehicleManufacturer;
|
||||
use App\Entity\Vehicle;
|
||||
|
||||
use DateTime;
|
||||
use PDO;
|
||||
|
||||
class GenerateCustomerSourceReportCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('report:customer_source')
|
||||
->setDescription('Create customer source reports')
|
||||
->setHelp('Creates customer source reports.')
|
||||
->addArgument('year', InputArgument::REQUIRED, 'Year to process customer data')
|
||||
->addArgument('month', InputArgument::REQUIRED, 'Month to process customer data')
|
||||
->addArgument('csv_file', InputArgument::REQUIRED, 'Output CSV file');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$em = $this->em;
|
||||
|
||||
// get year and month
|
||||
$year = $input->getArgument('year');
|
||||
$month = $input->getArgument('month');
|
||||
$csv_file = $input->getArgument('csv_file');
|
||||
|
||||
// get all mobile user customer id hash
|
||||
$resq_cust_ids = $this->getRESQCustomerIDs();
|
||||
|
||||
// TODO: error checking for file
|
||||
$fp = fopen($csv_file, 'w');
|
||||
|
||||
// pdo connection
|
||||
$db = $em->getConnection();
|
||||
|
||||
// get all customers
|
||||
$sql = 'select c.id, c.first_name, c.last_name, c.phone_mobile, c.phone_landline, c.phone_office, c.phone_fax, c.email, c.flag_mobile_app, vm.name, v.make, cv.model_year, cv.plate_number from customer c, customer_vehicle cv, vehicle v, vehicle_manufacturer vm where year(c.date_create) = :year and month(c.date_create) = :month and c.id = cv.customer_id and cv.vehicle_id = v.id and v.manufacturer_id = vm.id';
|
||||
$stmt = $db->prepare($sql);
|
||||
$stmt->execute([
|
||||
'month' => $month,
|
||||
'year' => $year,
|
||||
]);
|
||||
|
||||
// add header rows
|
||||
fputcsv($fp, [
|
||||
'Customer ID',
|
||||
'First Name',
|
||||
'Last Name',
|
||||
'Mobile Phone',
|
||||
'Landline',
|
||||
'Office Phone',
|
||||
'Fax',
|
||||
'Email Address',
|
||||
'Vehicle Manufacturer',
|
||||
'Vehicle Make',
|
||||
'Model Year',
|
||||
'Plate Number',
|
||||
'Source',
|
||||
]);
|
||||
|
||||
// go through rows
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM))
|
||||
{
|
||||
// TODO: find customer source
|
||||
// NOTE: flag_mobile_app is 0 for some reason
|
||||
// customer source
|
||||
if (isset($resq_cust_ids[$row[0]]))
|
||||
$source = 'resq';
|
||||
else
|
||||
$source = 'crm / owr';
|
||||
|
||||
$data = [
|
||||
$row[0], // id
|
||||
$row[1], // first name
|
||||
$row[2], // last name
|
||||
$row[3], // phone - mobile
|
||||
$row[4], // phone - landline
|
||||
$row[5], // phone - office
|
||||
$row[6], // phone - fax
|
||||
$row[7], // email
|
||||
$row[9], // vehicle manufacturer
|
||||
$row[10], // vehicle make
|
||||
$row[11], // vehicle model
|
||||
$row[12], // plate number
|
||||
$source // customer source
|
||||
];
|
||||
|
||||
fputcsv($fp, $data);
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function getRESQCustomerIDs()
|
||||
{
|
||||
// pdo connection
|
||||
$db = $this->em->getConnection();
|
||||
|
||||
// get all customer ids of all mobile sessions
|
||||
$sql = 'select distinct customer_id from mobile_session';
|
||||
$stmt = $db->prepare($sql);
|
||||
$stmt->execute();
|
||||
$res = $stmt->fetchAll();
|
||||
|
||||
$cust_ids = [];
|
||||
|
||||
foreach ($res as $cust)
|
||||
{
|
||||
$cust_ids[$cust['customer_id']] = $cust['customer_id'];
|
||||
}
|
||||
|
||||
return $cust_ids;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,27 +16,21 @@ use App\Entity\JobOrder;
|
|||
use App\Entity\Warranty;
|
||||
use App\Entity\SAPBattery;
|
||||
|
||||
use App\Service\WarrantyAPILogger;
|
||||
|
||||
use App\Ramcar\ServiceType;
|
||||
use App\Ramcar\WarrantyStatus;
|
||||
use App\Ramcar\WarrantySource;
|
||||
|
||||
use DoctrineExtensions\Query\Mysql\DateFormat;
|
||||
|
||||
class GenerateWarrantyFromJobOrderCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
protected $logger;
|
||||
protected $sapbatt_hash;
|
||||
protected $warranties_hash;
|
||||
|
||||
public function __construct(EntityManagerInterface $em, WarrantyAPILogger $logger)
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->logger = $logger;
|
||||
|
||||
$this->loadSAPBatteries();
|
||||
$this->loadWarranties();
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
@ -45,10 +39,7 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
{
|
||||
$this->setName('warranty:generate')
|
||||
->setDescription('Generates warranty from job order and inserts into database')
|
||||
->setHelp('Generate warranty from job order')
|
||||
->addArgument('start_date', InputArgument::REQUIRED, 'Start Date')
|
||||
->addArgument('end_date', InputArgument::REQUIRED, 'End Date')
|
||||
->addArgument('output_filename', InputArgument::REQUIRED, 'Output Filename');
|
||||
->setHelp('Generate warranty from job order');
|
||||
}
|
||||
|
||||
protected function computeDateExpire($date_create, $warranty_period)
|
||||
|
|
@ -71,6 +62,28 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
}
|
||||
}
|
||||
|
||||
protected function loadWarranties()
|
||||
{
|
||||
$this->warranties_hash = [];
|
||||
|
||||
/*
|
||||
$warranties = $this->em->getRepository(Warranty::class)->findAll();
|
||||
foreach($warranties as $warranty)
|
||||
{
|
||||
$plate_number = $warranty->getPlateNumber();
|
||||
$date_expire = $warranty->getDateExpire();
|
||||
|
||||
// skip null date expire
|
||||
if ($date_expire == null)
|
||||
continue;
|
||||
|
||||
$expiry_date = $date_expire->format('Y-m-d');
|
||||
|
||||
$this->warranties_hash[$plate_number][$expiry_date] = $warranty->getID();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
protected function findSAPBattery($batt_id)
|
||||
{
|
||||
if (!isset($this->sapbatt_hash[$batt_id]))
|
||||
|
|
@ -83,9 +96,8 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
|
||||
protected function findWarranty($plate_number, $expiry_date)
|
||||
{
|
||||
// find warranty given plate number and expiration date
|
||||
$results = $this->em->getRepository(Warranty::class)->findBy(['plate_number' => $plate_number, 'date_expire' => $expiry_date]);
|
||||
if (empty($results))
|
||||
$date_expire = $expiry_date->format('Y-m-d');
|
||||
if (!isset($this->warranties_hash[$plate_number][$date_expire]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -97,20 +109,9 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
{
|
||||
$em = $this->em;
|
||||
|
||||
$s_date = $input->getArgument('start_date');
|
||||
$e_date = $input->getArgument('end_date');
|
||||
$output_filename = $input->getArgument('output_filename');
|
||||
|
||||
$start_date = DateTime::createFromFormat('Ymd', $s_date);
|
||||
$end_date = DateTime::createFromFormat('Ymd', $e_date);
|
||||
$end_date->setTime(23, 59);
|
||||
|
||||
// to save on joins, go with invoice item first
|
||||
$query = $em->createQuery('select ii,i,jo,cv from App\Entity\InvoiceItem ii inner join ii.invoice i inner join i.job_order jo inner join jo.cus_vehicle cv join jo.customer c where ii.battery is not null and jo.service_type = :service_type and jo.date_schedule > :date_start and jo.date_schedule < :date_end');
|
||||
$query->setParameter('service_type', ServiceType::BATTERY_REPLACEMENT_NEW)
|
||||
->setParameter('date_start', $start_date)
|
||||
->setParameter('date_end', $end_date);
|
||||
|
||||
$query = $em->createQuery('select ii,i,jo,cv from App\Entity\InvoiceItem ii inner join ii.invoice i inner join i.job_order jo inner join jo.cus_vehicle cv join jo.customer c where ii.battery is not null and jo.service_type = :service_type');
|
||||
$query->setParameter('service_type', ServiceType::BATTERY_REPLACEMENT_NEW);
|
||||
/*
|
||||
$query = $em->createQuery('SELECT jo FROM App\Entity\JobOrder jo
|
||||
WHERE jo.service_type = :service_type');
|
||||
|
|
@ -119,7 +120,6 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
|
||||
$result = $query->iterate();
|
||||
|
||||
$dupe_warranties = [];
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$invoice_item = $row[0];
|
||||
|
|
@ -169,28 +169,15 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
// check if plate number is "clean". If not, do not insert into warranty
|
||||
if (!(Warranty::cleanPlateNumber($cv->getPlateNumber())))
|
||||
{
|
||||
// log with the dupes
|
||||
$dupe_warranties[] = [
|
||||
'plate_number' => $cv->getPlateNumber(),
|
||||
];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if warranty already exists
|
||||
$cleaned_plate_number = Warranty::cleanPlateNumber($cv->getPlateNumber());
|
||||
|
||||
//$expiry_date = $this->computeDateExpire($jo->getInvoice()->getDateCreate(), $warranty_period);
|
||||
// use date_schedule as the starting point of expiry date computation
|
||||
$expiry_date_date_schedule = $this->computeDateExpire($jo->getDateSchedule(), $warranty_period);
|
||||
$found_warranty_date_schedule = $this->findWarranty($cleaned_plate_number, $expiry_date_date_schedule);
|
||||
|
||||
// need to check for warranty using invoice date_create because
|
||||
// first version of this command used invoice's date_create for expiry date computation
|
||||
$expiry_date_date_create = $this->computeDateExpire($jo->getInvoice()->getDateCreate(), $warranty_period);
|
||||
$found_warranty_date_create = $this->findWarranty($cleaned_plate_number, $expiry_date_date_create);
|
||||
|
||||
if ((!$found_warranty_date_schedule) && (!$found_warranty_date_create))
|
||||
$expiry_date = $this->computeDateExpire($jo->getInvoice()->getDateCreate(), $warranty_period);
|
||||
$found_warranty = $this->findWarranty($cleaned_plate_number, $expiry_date);
|
||||
if (!$found_warranty)
|
||||
{
|
||||
$bty_model_id = $invoice_item->getBattery()->getModel()->getID();
|
||||
$bty_size_id = $invoice_item->getBattery()->getSize()->getID();
|
||||
|
|
@ -201,7 +188,7 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
|
||||
$date_create = date('Y-m-d H:i:s');
|
||||
|
||||
$date_expire = $expiry_date_date_schedule->format('Y-m-d');
|
||||
$date_expire = $expiry_date->format('Y-m-d');
|
||||
|
||||
$first_name = addslashes(trim($customer->getFirstName()));
|
||||
$last_name = addslashes(trim($customer->getLastName()));
|
||||
|
|
@ -210,47 +197,13 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
$values = '(' . $bty_model_id . ',' . $bty_size_id . ',NULL,\'' . $warranty_class . '\',\''
|
||||
. $cleaned_plate_number . '\',\'' . WarrantyStatus::ACTIVE . '\',\'' . $date_create . '\',\'' . $date_purchase
|
||||
. '\',\'' . $date_expire . '\',NULL,'
|
||||
. $sap_code . ',NULL,\'' . $first_name . '\',\'' . $last_name . '\',\'' . $mobile_number . '\',' . 0 . ',NULL,\''
|
||||
. WarrantySource::COMMAND .'\');';
|
||||
. $sap_code . ',NULL,\'' . $first_name . '\',\'' . $last_name . '\',\'' . $mobile_number . '\');';
|
||||
|
||||
$sql_statement = 'INSERT INTO `warranty` (bty_model_id,bty_size_id,serial,warranty_class,plate_number,status,date_create,date_purchase,date_expire,date_claim,sap_bty_id,claim_id,first_name,last_name,mobile_number,flag_activated,warranty_privacy_policy,create_source) VALUES ' . $values . "\n";
|
||||
$sql_statement = 'INSERT INTO `warranty` (bty_model_id,bty_size_id,serial,warranty_class,plate_number,status,date_create,date_purchase,date_expire,date_claim,sap_bty_id,claim_id,first_name,last_name,mobile_number) VALUES ' . $values . "\n";
|
||||
|
||||
echo $sql_statement;
|
||||
|
||||
$db = $this->em->getConnection();
|
||||
$stmt = $db->prepare($sql_statement);
|
||||
$stmt->execute();
|
||||
|
||||
// log warranty creation
|
||||
$log_data = [
|
||||
'battery_model_id' => $bty_model_id,
|
||||
'battery_size_id' => $bty_size_id,
|
||||
'warranty_class' => $warranty_class,
|
||||
'plate_number' => $cleaned_plate_number,
|
||||
'date_create' => $date_create,
|
||||
'date_purchase' => $date_purchase,
|
||||
'date_expire' => $date_expire,
|
||||
'sap_code' => $sap_code,
|
||||
'first_name' => $first_name,
|
||||
'last_name' => $last_name,
|
||||
'mobile_number' => $mobile_number,
|
||||
];
|
||||
$this->logger->logWarrantyInfo($log_data, '', 'internal', 'create', WarrantySource::COMMAND);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$expiry_date = '';
|
||||
if ($expiry_date_date_create != $expiry_date_date_schedule)
|
||||
$expiry_date = $expiry_date_date_create->format('Y-m-d');
|
||||
else
|
||||
$expiry_date = $expiry_date_date_schedule->format('Y-m-d');
|
||||
|
||||
$dupe_warranties[] = [
|
||||
'plate_number' => $cleaned_plate_number,
|
||||
'expiry_date' => $expiry_date,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -258,24 +211,5 @@ class GenerateWarrantyFromJobOrderCommand extends Command
|
|||
$em->detach($row[0]);
|
||||
$em->clear();
|
||||
}
|
||||
|
||||
// check if dupes were found
|
||||
if (count($dupe_warranties) > 0)
|
||||
{
|
||||
// output file
|
||||
$dupe_outfile = fopen($output_filename, 'a');
|
||||
|
||||
foreach ($dupe_warranties as $dupe)
|
||||
{
|
||||
if (empty($dupe['expiry_date']))
|
||||
fwrite($dupe_outfile, 'Invalid plate number ' . $dupe['plate_number'] . "\n");
|
||||
else
|
||||
fwrite($dupe_outfile, 'Warranty already exists for ' . $dupe['plate_number'] . ' with expiration date ' . $dupe['expiry_date'] . "\n");
|
||||
}
|
||||
|
||||
fclose($dupe_outfile);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ class ImportBatteryPriceCommand extends Command
|
|||
protected $em;
|
||||
protected $size_index;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
public function __construct(EntityManagerInterface $om)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->em = $om;
|
||||
$this->size_index = [];
|
||||
|
||||
parent::__construct();
|
||||
|
|
@ -174,7 +174,5 @@ class ImportBatteryPriceCommand extends Command
|
|||
}
|
||||
|
||||
$em->flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,8 +170,6 @@ class ImportCMBBatteryDataCommand extends Command
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function addBatteryManufacturer($name)
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@ class ImportCMBBatteryTradeInPriceCommand extends Command
|
|||
{
|
||||
error_log('Cannot find battery size ' . $size);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadBatterySizes()
|
||||
|
|
|
|||