diff --git a/system/controllers/map.php b/system/controllers/map.php index 20a9d9b..0ef05bd 100644 --- a/system/controllers/map.php +++ b/system/controllers/map.php @@ -28,6 +28,7 @@ switch ($action) { 'name' => $customer->fullname, 'balance' => $customer->balance, 'address' => $customer->address, + 'direction' => $customer->coordinates, 'info' => Lang::T("Username") . ": " . $customer->username . " - " . Lang::T("Full Name") . ": " . $customer->fullname . " - " . Lang::T("Email") . ": " . $customer->email . " - " . Lang::T("Phone") . ": " . $customer->phonenumber . " - " . Lang::T("Service Type") . ": " . $customer->service_type, 'coordinates' => '[' . $customer->coordinates . ']', ]; diff --git a/ui/ui/customer-map.tpl b/ui/ui/customer-map.tpl index 7ecff00..44404ec 100644 --- a/ui/ui/customer-map.tpl +++ b/ui/ui/customer-map.tpl @@ -24,34 +24,35 @@ var customers = {/literal}{$customers|json_encode}{literal}; L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png', { - attribution: - '© OpenStreetMap contributors © CARTO', - subdomains: 'abcd', - maxZoom: 20 - }).addTo(map); + attribution: + '© OpenStreetMap contributors © CARTO', + subdomains: 'abcd', + maxZoom: 20 + }).addTo(map); - customers.forEach(function(customer) { - var name = customer.id; - var name = customer.name; - var info = customer.info; - var coordinates = customer.coordinates; - var balance = customer.balance; - var address = customer.address; + customers.forEach(function(customer) { + var name = customer.id; + var name = customer.name; + var info = customer.info; + var direction = customer.direction; + var coordinates = customer.coordinates; + var balance = customer.balance; + var address = customer.address; - // Create a popup for the marker - var popupContent = "Customer Name: " + name + "
" + - "Customer Info: " + info + "
" + - "Customer Balance: " + balance + "
" + - "Address: " + address + "
" + - "Coordinates: " + coordinates + "
" + - "More Info
"; + // Create a popup for the marker + var popupContent = "Name: " + name + "
" + + "Info: " + info + "
" + + "Balance: " + balance + "
" + + "Address: " + address + "
" + + "More Info • " + + "Get Direction
"; - // Add marker to map - var marker = L.marker(JSON.parse(coordinates)).addTo(group); - marker.bindTooltip(name).bindPopup(popupContent); - }); + // Add marker to map + var marker = L.marker(JSON.parse(coordinates)).addTo(group); + marker.bindTooltip(name, { permanent: true }).bindPopup(popupContent); + }); - map.fitBounds(group.getBounds()); + map.fitBounds(group.getBounds()); } window.onload = function() { getLocation(); diff --git a/ui/ui/customers-view.tpl b/ui/ui/customers-view.tpl index 3cd5d42..755130e 100644 --- a/ui/ui/customers-view.tpl +++ b/ui/ui/customers-view.tpl @@ -30,29 +30,34 @@ onclick="this.select()"> {if $d['pppoe_password'] != ''} -
  • - PPPOE {Lang::T('Password')} -
  • +
  • + PPPOE {Lang::T('Password')} +
  • + {/if} + {if $d['coordinates']} +
  • + {Lang::T('Coordinates')} + Get + Directions + +
  • {/if} -
  • - {Lang::T('Coordinates')} {$d['coordinates']} -
  • {if $customFields} - {foreach $customFields as $customField} -
  • - {$customField.field_name} - {if strpos($customField.field_value, ':0') === false} - {$customField.field_value} - {else} - {Lang::T('Paid')} - {/if} - -
  • - {/foreach} + {foreach $customFields as $customField} +
  • + {$customField.field_name} + {if strpos($customField.field_value, ':0') === false} + {$customField.field_value} + {else} + {Lang::T('Paid')} + {/if} + +
  • + {/foreach} {/if}
  • @@ -92,12 +97,12 @@ {foreach $packages as $package} -
    -
    -

    {$package['type']} - {$package['namebp']}

    -
      -
    • - {Lang::T('Active')} {if +
      +
      +

      {$package['type']} - {$package['namebp']}

      +
        +
      • + {Lang::T('Active')} {if $package['status']=='on'}yes{else}no {/if}
      • @@ -110,8 +115,7 @@ class="pull-right">{Lang::dateAndTimeFormat($package['recharged_on'],$package['recharged_time'])}
      • - {Lang::T('Expires On')} {Lang::dateAndTimeFormat($package['expiration'], + {Lang::T('Expires On')} {Lang::dateAndTimeFormat($package['expiration'], $package['time'])}
      • @@ -157,68 +161,68 @@
        {if Lang::arrayCount($activation)} - - - - - - - - - - - - - - {foreach $activation as $ds} - - - - - - - - - - - {/foreach} - + + + + + + + + + + + + + + {foreach $activation as $ds} + + + + + + + + + + + {/foreach} + {/if} {if Lang::arrayCount($order)} - - - - - - - - - - - - - - - {foreach $order as $ds} - - - - - - - - - - - - {/foreach} - + + + + + + + + + + + + + + + {foreach $order as $ds} + + + + + + + + + + + + {/foreach} + {/if}
        {Lang::T('Invoice')}{Lang::T('Username')}{Lang::T('Plan Name')}{Lang::T('Plan Price')}{Lang::T('Type')}{Lang::T('Created On')}{Lang::T('Expires On')}{Lang::T('Method')}
        {$ds['invoice']}{$ds['username']}{$ds['plan_name']}{Lang::moneyFormat($ds['price'])}{$ds['type']}{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])} - {Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}{$ds['method']}
        {Lang::T('Invoice')}{Lang::T('Username')}{Lang::T('Plan Name')}{Lang::T('Plan Price')}{Lang::T('Type')}{Lang::T('Created On')}{Lang::T('Expires On')}{Lang::T('Method')}
        {$ds['invoice']}{$ds['username']}{$ds['plan_name']}{Lang::moneyFormat($ds['price'])}{$ds['type']}{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])} + {Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}{$ds['method']}
        {Lang::T('Plan Name')}{Lang::T('Gateway')}{Lang::T('Routers')}{Lang::T('Type')}{Lang::T('Plan Price')}{Lang::T('Created On')}{Lang::T('Expires On')}{Lang::T('Date Done')}{Lang::T('Method')}
        {$ds['plan_name']}{$ds['gateway']}{$ds['routers']}{$ds['payment_channel']}{Lang::moneyFormat($ds['price'])}{Lang::dateTimeFormat($ds['created_date'])}{Lang::dateTimeFormat($ds['expired_date'])}{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if}{if $ds['status']==1}{Lang::T('UNPAID')} - {elseif $ds['status']==2}{Lang::T('PAID')} - {elseif $ds['status']==3}{$_L['FAILED']} - {elseif $ds['status']==4}{Lang::T('CANCELED')} - {elseif $ds['status']==5}{Lang::T('UNKNOWN')} - {/if}
        {Lang::T('Plan Name')}{Lang::T('Gateway')}{Lang::T('Routers')}{Lang::T('Type')}{Lang::T('Plan Price')}{Lang::T('Created On')}{Lang::T('Expires On')}{Lang::T('Date Done')}{Lang::T('Method')}
        {$ds['plan_name']}{$ds['gateway']}{$ds['routers']}{$ds['payment_channel']}{Lang::moneyFormat($ds['price'])}{Lang::dateTimeFormat($ds['created_date'])}{Lang::dateTimeFormat($ds['expired_date'])}{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if}{if $ds['status']==1}{Lang::T('UNPAID')} + {elseif $ds['status']==2}{Lang::T('PAID')} + {elseif $ds['status']==3}{$_L['FAILED']} + {elseif $ds['status']==4}{Lang::T('CANCELED')} + {elseif $ds['status']==5}{Lang::T('UNKNOWN')} + {/if}