Initial commit

This commit is contained in:
Kwesi Banson Jnr
2026-08-04 14:50:01 +00:00
commit 2cfcfade4e
1605 changed files with 499334 additions and 0 deletions

3
resources/css/app.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

7
resources/js/app.js Normal file
View File

@@ -0,0 +1,7 @@
require('./bootstrap');
import Alpine from 'alpinejs';
window.Alpine = Alpine;
Alpine.start();

28
resources/js/bootstrap.js vendored Normal file
View File

@@ -0,0 +1,28 @@
window._ = require('lodash');
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });

View File

@@ -0,0 +1,20 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];

View File

@@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
];

View File

@@ -0,0 +1,163 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'numeric' => 'The :attribute must be greater than :value.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'string' => 'The :attribute must be greater than :value characters.',
'array' => 'The :attribute must have more than :value items.',
],
'gte' => [
'numeric' => 'The :attribute must be greater than or equal to :value.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
'string' => 'The :attribute must be greater than or equal to :value characters.',
'array' => 'The :attribute must have :value items or more.',
],
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'lt' => [
'numeric' => 'The :attribute must be less than :value.',
'file' => 'The :attribute must be less than :value kilobytes.',
'string' => 'The :attribute must be less than :value characters.',
'array' => 'The :attribute must have less than :value items.',
],
'lte' => [
'numeric' => 'The :attribute must be less than or equal to :value.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
'string' => 'The :attribute must be less than or equal to :value characters.',
'array' => 'The :attribute must not have more than :value items.',
],
'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [
'numeric' => 'The :attribute must not be greater than :max.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'string' => 'The :attribute must not be greater than :max characters.',
'array' => 'The :attribute must not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute must be a valid URL.',
'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];

View File

@@ -0,0 +1,73 @@
@extends('layouts.admin_master')
@section('page-title')
Admin | All Activities
@endsection
@section('page-css')
<!-- third party css -->
<link href="{{ url('public/assets/css/vendor/dataTables.bootstrap4.css')}}" rel="stylesheet" type="text/css" />
<link href="{{ url('public/assets/css/vendor/responsive.bootstrap4.css')}}" rel="stylesheet" type="text/css" />
<!-- third party css end -->
@endsection
@section('page-content')
{{-- Alert --}}
@include('layouts.alert')
<div class="row">
<div class="col-12">
<div class="hpanel">
<div class="panel-heading">Admin Activity Log <br>
<div class="clearfix"></div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped" >
<thead class="">
<tr class="">
<th>Admin Name</th>
<th>Description</th>
<th>Date Created</th>
</tr>
</thead>
<tbody>
@forelse ($activities as $activity)
<tr class="bg" style="color: #000;">
<td class="table-user">
<a href="javascript:void(0);" class="text-bodys font-weight-semibold" style="color: #000;">{{ $activity->admin->name }}</a>
</td>
<td>
<span class="font-weight-semibold">
<!-- {{ $activity->description }} -->
<?php
$activity_arr = json_decode($activity->description, true);
// dump($activity->description);
?>
{{ $activity_arr['title'] }} : {{ $activity_arr['data'] }}
</span>
</td>
<td>
{{ Carbon\Carbon::parse($activity->created_at)->format('F dS Y') }}
</td>
</tr>
@empty
<td colspan="3">No Data</td>
@endforelse
</tbody>
</table>
{{ $activities->links() }}
</div>
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col -->
</div>
<!-- end row -->
@endsection
@section('page-js')
@endsection

View File

@@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Airtime USSD API Documentation</title>
<!-- Bootstrap 5 CSS CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light text-dark">
<div class="container py-5" style="max-width: 960px;">
<!-- Header -->
<div class="card shadow-sm mb-4">
<div class="card-body p-4">
<h1 class="display-6 fw-bold text-primary">Airtime USSD API</h1>
<p class="text-muted mb-3">API Documentation for managing merchants, customer top-ups, dealers, and transactions[cite: 1].</p>
<div>
<span class="badge bg-info text-dark">Base URL: http://localhost:8131/api[cite: 1]</span>
</div>
</div>
</div>
<!-- Endpoints List -->
<div class="vstack gap-4">
<!-- 1. Create App Token -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Create App Token</h2>
<span class="badge bg-success">POST</span>
</div>
<p class="small text-muted mb-2"><strong>Endpoint:</strong> <code>/login</code>[cite: 1]</p>
<div class="bg-dark text-light p-3 rounded mt-3">
<span class="text-uppercase small fw-bold text-secondary d-block mb-1">Request Body (JSON)</span>
<pre class="mb-0 text-success<code>">{
"email" : "kwesi@click-mobile.com",
"password" : "password"
}</pre>
</div>
</div>
</div>
<!-- 2. Merchant Login -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Merchant Login</h2>
<span class="badge bg-success">POST</span>
</div>
<p class="small text-muted mb-1"><strong>Endpoint:</strong> <code>/merchant/login</code>[cite: 1]</p>
<p class="small text-muted mb-2"><strong>Authentication:</strong> Bearer Token[cite: 1]</p>
<div class="bg-dark text-light p-3 rounded mt-3">
<span class="text-uppercase small fw-bold text-secondary d-block mb-1">Request Body (JSON)</span>
<pre class="mb-0 text-success<code>">{
"phone_number" : "265881161942",
"pin" : "1234"
}</pre>
</div>
</div>
</div>
<!-- 3. Merchant Transactions -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Merchant Transactions</h2>
<span class="badge bg-success">POST</span>
</div>
<p class="small text-muted mb-1"><strong>Endpoint:</strong> <code>/merchant/transactions</code>[cite: 1]</p>
<p class="small text-muted mb-1"><strong>Headers:</strong> Accept: application/json[cite: 1]</p>
<p class="small text-muted mb-2"><strong>Authentication:</strong> Bearer Token[cite: 1]</p>
<div class="bg-dark text-light p-3 rounded mt-3">
<span class="text-uppercase small fw-bold text-secondary d-block mb-1">Request Body (JSON)</span>
<pre class="mb-0 text-success<code>">{
"merchant_id": 1,
"keyword": "Baldwin",
"start_date": "2025-07-20",
"end_date": "2026-05-10",
"per_page": 20
}</pre>
</div>
</div>
</div>
<!-- 4. Customer Top Up -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Customer Top Up</h2>
<span class="badge bg-success">POST</span>
</div>
<p class="small text-muted mb-1"><strong>Endpoint:</strong> <code>/merchant/customertopup</code>[cite: 1]</p>
<p class="small text-muted mb-1"><strong>Headers:</strong> Accept: application/json[cite: 1]</p>
<p class="small text-muted mb-2"><strong>Authentication:</strong> Bearer Token[cite: 1]</p>
<div class="bg-dark text-light p-3 rounded mt-3">
<span class="text-uppercase small fw-bold text-secondary d-block mb-1">Request Body (JSON)</span>
<pre class="mb-0 text-success<code>">{
"phone_number" : "265881161942",
"amount" : "20",
"merchant_id" : "1"
}</pre>
</div>
</div>
</div>
<!-- 5. Dealer List -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Dealer List</h2>
<span class="badge bg-primary">GET</span>
</div>
<p class="small text-muted mb-1"><strong>Endpoint:</strong> <code>/merchant/dealers?per_page=5</code>[cite: 1]</p>
<p class="small text-muted mb-2"><strong>Authentication:</strong> Bearer Token[cite: 1]</p>
</div>
</div>
<!-- 6. Merchant To Dealer Refund -->
<div class="card shadow-sm">
<div class="card-body p-4">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 mb-3">
<h2 class="h5 mb-0 fw-bold">Merchant To Dealer Refund</h2>
<span class="badge bg-success">POST</span>
</div>
<p class="small text-muted mb-1"><strong>Endpoint:</strong> <code>/merchant/refund</code>[cite: 1]</p>
<p class="small text-muted mb-1"><strong>Headers:</strong> Accept: application/json[cite: 1]</p>
<p class="small text-muted mb-2"><strong>Authentication:</strong> Bearer Token[cite: 1]</p>
<div class="bg-dark text-light p-3 rounded mt-3">
<span class="text-uppercase small fw-bold text-secondary d-block mb-1">Request Body (JSON)</span>
<pre class="mb-0 text-success<code>">{
"dealer_id" : "40",
"merchant_id" : "1",
"amount" : "2",
"reason" : "Testing Mic"
}</pre>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div class="text-center text-muted small mt-5">
&copy; {{ date('Y') }} Airtime USSD API Documentation[cite: 1]. All rights reserved.
</div>
</div>
<!-- Bootstrap 5 JS Bundle CDN (Optional) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<div class="mb-4 text-sm text-gray-600">
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
</div>
<!-- Validation Errors -->
<x-auth-validation-errors class="mb-4" :errors="$errors" />
<form method="POST" action="{{ route('password.confirm') }}">
@csrf
<!-- Password -->
<div>
<x-label for="password" :value="__('Password')" />
<x-input id="password" class="block mt-1 w-full"
type="password"
name="password"
required autocomplete="current-password" />
</div>
<div class="flex justify-end mt-4">
<x-button>
{{ __('Confirm') }}
</x-button>
</div>
</form>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,36 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<div class="mb-4 text-sm text-gray-600">
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
</div>
<!-- Session Status -->
<x-auth-session-status class="mb-4" :status="session('status')" />
<!-- Validation Errors -->
<x-auth-validation-errors class="mb-4" :errors="$errors" />
<form method="POST" action="{{ route('password.email') }}">
@csrf
<!-- Email Address -->
<div>
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
</div>
<div class="flex items-center justify-end mt-4">
<x-button>
{{ __('Email Password Reset Link') }}
</x-button>
</div>
</form>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,56 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<!-- Session Status -->
<x-auth-session-status class="mb-4" :status="session('status')" />
<!-- Validation Errors -->
<x-auth-validation-errors class="mb-4" :errors="$errors" />
<form method="POST" action="{{ route('login') }}">
@csrf
<!-- Email Address -->
<div>
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
</div>
<!-- Password -->
<div class="mt-4">
<x-label for="password" :value="__('Password')" />
<x-input id="password" class="block mt-1 w-full"
type="password"
name="password"
required autocomplete="current-password" />
</div>
<!-- Remember Me -->
<div class="block mt-4">
<label for="remember_me" class="inline-flex items-center">
<input id="remember_me" type="checkbox" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" name="remember">
<span class="ml-2 text-sm text-gray-600">{{ __('Remember me') }}</span>
</label>
</div>
<div class="flex items-center justify-end mt-4">
@if (Route::has('password.request'))
<a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ route('password.request') }}">
{{ __('Forgot your password?') }}
</a>
@endif
<x-button class="ml-3">
{{ __('Log in') }}
</x-button>
</div>
</form>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,59 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<!-- Validation Errors -->
<x-auth-validation-errors class="mb-4" :errors="$errors" />
<form method="POST" action="{{ route('register') }}">
@csrf
<!-- Name -->
<div>
<x-label for="name" :value="__('Name')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus />
</div>
<!-- Email Address -->
<div class="mt-4">
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required />
</div>
<!-- Password -->
<div class="mt-4">
<x-label for="password" :value="__('Password')" />
<x-input id="password" class="block mt-1 w-full"
type="password"
name="password"
required autocomplete="new-password" />
</div>
<!-- Confirm Password -->
<div class="mt-4">
<x-label for="password_confirmation" :value="__('Confirm Password')" />
<x-input id="password_confirmation" class="block mt-1 w-full"
type="password"
name="password_confirmation" required />
</div>
<div class="flex items-center justify-end mt-4">
<a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ route('login') }}">
{{ __('Already registered?') }}
</a>
<x-button class="ml-4">
{{ __('Register') }}
</x-button>
</div>
</form>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,48 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<!-- Validation Errors -->
<x-auth-validation-errors class="mb-4" :errors="$errors" />
<form method="POST" action="{{ route('password.update') }}">
@csrf
<!-- Password Reset Token -->
<input type="hidden" name="token" value="{{ $request->route('token') }}">
<!-- Email Address -->
<div>
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $request->email)" required autofocus />
</div>
<!-- Password -->
<div class="mt-4">
<x-label for="password" :value="__('Password')" />
<x-input id="password" class="block mt-1 w-full" type="password" name="password" required />
</div>
<!-- Confirm Password -->
<div class="mt-4">
<x-label for="password_confirmation" :value="__('Confirm Password')" />
<x-input id="password_confirmation" class="block mt-1 w-full"
type="password"
name="password_confirmation" required />
</div>
<div class="flex items-center justify-end mt-4">
<x-button>
{{ __('Reset Password') }}
</x-button>
</div>
</form>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,39 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>
<div class="mb-4 text-sm text-gray-600">
{{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
</div>
@if (session('status') == 'verification-link-sent')
<div class="mb-4 font-medium text-sm text-green-600">
{{ __('A new verification link has been sent to the email address you provided during registration.') }}
</div>
@endif
<div class="mt-4 flex items-center justify-between">
<form method="POST" action="{{ route('verification.send') }}">
@csrf
<div>
<x-button>
{{ __('Resend Verification Email') }}
</x-button>
</div>
</form>
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="underline text-sm text-gray-600 hover:text-gray-900">
{{ __('Log Out') }}
</button>
</form>
</div>
</x-auth-card>
</x-guest-layout>

View File

@@ -0,0 +1,32 @@
@if ($errors->any())
<ul class="alert alert-danger" style="padding-left:30px;">
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
@endif
@if(Session::has('success_message'))
<div style="text-align: center" class="alert alert-success notification-alert">
{{ Session::get('success_message') }}
</div>
@elseif(Session::has('error_message'))
<div style="text-align: center" class="alert alert-danger notification-alert">
{{ Session::get('error_message') }}
</div>
@endif
@if (Session::has('admin-success'))
<div class="alert alert-success border-0" role="alert">
<strong>{{ Session::get('admin-success') }}</strong>
</div>
@endif
@if (Session::has('admin-error'))
<div class="alert alert-danger border-0" role="alert">
{{ Session::get('admin-error')}}
</div>
@endif
<div style="text-align: center" class="alert alert-success hidden d-none" id="successArea" ></div>
<div style="text-align: center" class="alert alert-danger hidden d-none" id="errorArea"></div>

View File

@@ -0,0 +1,3 @@
<svg viewBox="0 0 316 316" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
<path d="M305.8 81.125C305.77 80.995 305.69 80.885 305.65 80.755C305.56 80.525 305.49 80.285 305.37 80.075C305.29 79.935 305.17 79.815 305.07 79.685C304.94 79.515 304.83 79.325 304.68 79.175C304.55 79.045 304.39 78.955 304.25 78.845C304.09 78.715 303.95 78.575 303.77 78.475L251.32 48.275C249.97 47.495 248.31 47.495 246.96 48.275L194.51 78.475C194.33 78.575 194.19 78.725 194.03 78.845C193.89 78.955 193.73 79.045 193.6 79.175C193.45 79.325 193.34 79.515 193.21 79.685C193.11 79.815 192.99 79.935 192.91 80.075C192.79 80.285 192.71 80.525 192.63 80.755C192.58 80.875 192.51 80.995 192.48 81.125C192.38 81.495 192.33 81.875 192.33 82.265V139.625L148.62 164.795V52.575C148.62 52.185 148.57 51.805 148.47 51.435C148.44 51.305 148.36 51.195 148.32 51.065C148.23 50.835 148.16 50.595 148.04 50.385C147.96 50.245 147.84 50.125 147.74 49.995C147.61 49.825 147.5 49.635 147.35 49.485C147.22 49.355 147.06 49.265 146.92 49.155C146.76 49.025 146.62 48.885 146.44 48.785L93.99 18.585C92.64 17.805 90.98 17.805 89.63 18.585L37.18 48.785C37 48.885 36.86 49.035 36.7 49.155C36.56 49.265 36.4 49.355 36.27 49.485C36.12 49.635 36.01 49.825 35.88 49.995C35.78 50.125 35.66 50.245 35.58 50.385C35.46 50.595 35.38 50.835 35.3 51.065C35.25 51.185 35.18 51.305 35.15 51.435C35.05 51.805 35 52.185 35 52.575V232.235C35 233.795 35.84 235.245 37.19 236.025L142.1 296.425C142.33 296.555 142.58 296.635 142.82 296.725C142.93 296.765 143.04 296.835 143.16 296.865C143.53 296.965 143.9 297.015 144.28 297.015C144.66 297.015 145.03 296.965 145.4 296.865C145.5 296.835 145.59 296.775 145.69 296.745C145.95 296.655 146.21 296.565 146.45 296.435L251.36 236.035C252.72 235.255 253.55 233.815 253.55 232.245V174.885L303.81 145.945C305.17 145.165 306 143.725 306 142.155V82.265C305.95 81.875 305.89 81.495 305.8 81.125ZM144.2 227.205L100.57 202.515L146.39 176.135L196.66 147.195L240.33 172.335L208.29 190.625L144.2 227.205ZM244.75 114.995V164.795L226.39 154.225L201.03 139.625V89.825L219.39 100.395L244.75 114.995ZM249.12 57.105L292.81 82.265L249.12 107.425L205.43 82.265L249.12 57.105ZM114.49 184.425L96.13 194.995V85.305L121.49 70.705L139.85 60.135V169.815L114.49 184.425ZM91.76 27.425L135.45 52.585L91.76 77.745L48.07 52.585L91.76 27.425ZM43.67 60.135L62.03 70.705L87.39 85.305V202.545V202.555V202.565C87.39 202.735 87.44 202.895 87.46 203.055C87.49 203.265 87.49 203.485 87.55 203.695V203.705C87.6 203.875 87.69 204.035 87.76 204.195C87.84 204.375 87.89 204.575 87.99 204.745C87.99 204.745 87.99 204.755 88 204.755C88.09 204.905 88.22 205.035 88.33 205.175C88.45 205.335 88.55 205.495 88.69 205.635L88.7 205.645C88.82 205.765 88.98 205.855 89.12 205.965C89.28 206.085 89.42 206.225 89.59 206.325C89.6 206.325 89.6 206.325 89.61 206.335C89.62 206.335 89.62 206.345 89.63 206.345L139.87 234.775V285.065L43.67 229.705V60.135ZM244.75 229.705L148.58 285.075V234.775L219.8 194.115L244.75 179.875V229.705ZM297.2 139.625L253.49 164.795V114.995L278.85 100.395L297.21 89.825V139.625H297.2Z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,9 @@
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100">
<div>
{{ $logo }}
</div>
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden sm:rounded-lg">
{{ $slot }}
</div>
</div>

View File

@@ -0,0 +1,7 @@
@props(['status'])
@if ($status)
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600']) }}>
{{ $status }}
</div>
@endif

View File

@@ -0,0 +1,15 @@
@props(['errors'])
@if ($errors->any())
<div {{ $attributes }}>
<div class="font-medium text-red-600">
{{ __('Whoops! Something went wrong.') }}
</div>
<ul class="mt-3 list-disc list-inside text-sm text-red-600">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif

View File

@@ -0,0 +1,3 @@
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:ring ring-gray-300 disabled:opacity-25 transition ease-in-out duration-150']) }}>
{{ $slot }}
</button>

View File

@@ -0,0 +1 @@
<a {{ $attributes->merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }}</a>

View File

@@ -0,0 +1,43 @@
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])
@php
switch ($align) {
case 'left':
$alignmentClasses = 'origin-top-left left-0';
break;
case 'top':
$alignmentClasses = 'origin-top';
break;
case 'right':
default:
$alignmentClasses = 'origin-top-right right-0';
break;
}
switch ($width) {
case '48':
$width = 'w-48';
break;
}
@endphp
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
<div @click="open = ! open">
{{ $trigger }}
</div>
<div x-show="open"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="transform opacity-0 scale-95"
x-transition:enter-end="transform opacity-100 scale-100"
x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95"
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
style="display: none;"
@click="open = false">
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
{{ $content }}
</div>
</div>
</div>

View File

@@ -0,0 +1,3 @@
@props(['disabled' => false])
<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}>

View File

@@ -0,0 +1,5 @@
@props(['value'])
<label {{ $attributes->merge(['class' => 'block font-medium text-sm text-gray-700']) }}>
{{ $value ?? $slot }}
</label>

View File

@@ -0,0 +1,11 @@
@props(['active'])
@php
$classes = ($active ?? false)
? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
: 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out';
@endphp
<a {{ $attributes->merge(['class' => $classes]) }}>
{{ $slot }}
</a>

View File

@@ -0,0 +1,11 @@
@props(['active'])
@php
$classes = ($active ?? false)
? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out'
: 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out';
@endphp
<a {{ $attributes->merge(['class' => $classes]) }}>
{{ $slot }}
</a>

View File

@@ -0,0 +1,17 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Dashboard') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
You're logged in!
</div>
</div>
</div>
</div>
</x-app-layout>

View File

@@ -0,0 +1,190 @@
@extends('layouts.admin')
@section('page-title')
Admin | Dashboard
@endsection
@section('page-content')
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<form class="form-inline">
<div class="form-group">
<!-- <div class="input-group">
<input type="text" class="form-control form-control-light" id="dash-daterange">
<div class="input-group-append">
<span class="input-group-text bg-info border-info text-white">
<i class="mdi mdi-calendar-range font-13"></i>
</span>
</div>
</div> -->
</div>
</form>
</div>
<h4 class="page-title">Dashboard</h4>
</div>
</div>
</div>
<!-- end page title -->
{{-- Alert --}}
@include('layouts.alert')
<div class="row">
<div class="col-xl-12 col-lg-6">
<div class="row">
<div class="col-lg-6">
<div class="card widget-flat">
<div class="card-body">
<div class="float-right">
<i class="mdi mdi-account-multiple widget-icon bg-success-lighten text-success"></i>
</div>
<h5 class="text-muted font-weight-normal mt-0" title="Number of Customers">Mershants</h5>
<h3 class="mt-3 mb-3">{{ $merchant }}</h3>
{{-- <p class="mb-0 text-muted">
<span class="text-success mr-2"><i class="mdi mdi-arrow-up-bold"></i> 5.27%</span>
<span class="text-nowrap">Since last month</span>
</p> --}}
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
<div class="col-lg-6">
<div class="card widget-flat">
<div class="card-body">
<div class="float-right">
<i class="mdi mdi-cart-plus widget-icon bg-danger-lighten text-danger"></i>
</div>
<h5 class="text-muted font-weight-normal mt-0" title="Number of Orders">Top Ups</h5>
<h3 class="mt-3 mb-3">{{ $topup_count ?? "N/A" }}</h3>
{{-- <p class="mb-0 text-muted">
<span class="text-danger mr-2"><i class="mdi mdi-arrow-down-bold"></i> 1.08%</span>
<span class="text-nowrap">Since last month</span>
</p> --}}
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
</div> <!-- end row -->
</div> <!-- end col -->
<!-- <div class="col-xl-7 col-lg-6">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
<h6 id="transaction-data" class="d-none">{{ $transactions }}</h6>
</div>
<h4 class="header-title mb-3">Transactions</h4>
<div id="high-performing-product" class="apex-charts" data-colors="#fa6767,#e3eaef"></div>
</div>
</div>
</div> -->
</div>
<!-- end row -->
<div class="row">
<div class="col-md-7">
<div class="card">
<div class="card-body">
<h4 class="header-title mt-2">Recent Organisation Top Ups</h4>
<div class="table-responsive" data-simplebar style="max-height: 624px;">
<table class="table table-centered table-nowrap table-hover mb-0">
<tbody>
@forelse ($topups as $topup)
<tr>
<td>
<h5 class="font-14 my-1 font-weight-normal">Merchant : {{ $topup->orgInfo->name }}</h5>
<span class="text-muted font-13">{{ Carbon\Carbon::parse($topup->created_at)->format('F dS Y') }}</span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">K {{ $topup->amount }}</h5>
<span class="text-muted font-13">Amount</span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">{{ ucfirst($topup->payment_method) }}</h5>
<span class="text-muted font-13">Payment Method</span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">{{ $topup->userInfo->name }}</h5>
<span class="text-muted font-13">Admin</span>
</td>
</tr>
@empty
@endforelse
</tbody>
</table>
</div> <!-- end table-responsive-->
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
<div class="col-md-5">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
</div>
<h4 class="header-title mb-2">Recent Activity</h4>
<div data-simplebar style="max-height: 624px;">
<div class="timeline-alt pb-0">
@forelse ($activities as $activity)
<div class="timeline-item">
<i class="mdi mdi-upload bg-info-lighten text-info timeline-icon"></i>
<div class="timeline-item-info">
<a href="#" class="text-info font-weight-bold mb-1 d-block">{{ $activity->admin->name }}</a>
<small>
<?php
$data_arr = json_decode($activity->description);
// dump(gettype($data_arr));
//. " ==> " . $data_arr->data
echo (isset($data_arr->title)) ? $data_arr->title : "N/A";
?>
</small>
<p class="mb-0 pb-2">
<small class="text-muted">{{ $activity->created_at->diffForHumans() }}</small>
</p>
</div>
</div>
@empty
@endforelse
</div>
<!-- end timeline -->
</div> <!-- end slimscroll -->
</div>
<!-- end card-body -->
</div>
<!-- end card-->
</div>
<!-- end col -->
</div>
<!-- end row -->
@endsection
@section('page-js')
<!-- third party js -->
<script src="{{ url('public/assets/js/vendor/apexcharts.min.js')}}"></script>
<script src="{{ url('public/assets/js/vendor/jquery-jvectormap-1.2.2.min.js')}}"></script>
<script src="{{ url('public/assets/js/vendor/jquery-jvectormap-world-mill-en.js')}}"></script>
<!-- third party js ends -->
<!-- demo app -->
<script src="{{ url('public/assets/js/pages/demo.dashboard.js')}}"></script>
<!-- end demo js-->
@endsection

View File

@@ -0,0 +1,340 @@
@extends('layouts.admin_master')
@section('page-title')
Admin | Dashboard
@endsection
@section('page-content')
<div class="row">
<div class="col-lg-12 text-center welcome-message">
<h2>Welcome to Airtime Sales Admin Dashboard</h2>
<!-- <p>
Special <strong>Admin Theme</strong> for medium and large web applications with very clean and
aesthetic style and feel.
</p> -->
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="hpanel">
<div class="panel-body text-center h-200">
<i class="pe-7s-graph1 fa-4x"></i>
<h1 class="m-xs">MK {{ number_format($current_year_transactions_sum) }}</h1>
<h3 class="font-extra-bold no-margins text-success">
Sales({{ date('Y') }})
</h3>
<small>Sales from Merchants to customers</small>
</div>
<div class="panel-footer">
Sales from Merchants to end users
</div>
</div>
</div>
<div class="col-lg-3">
<div class="hpanel stats">
<div class="panel-body h-200">
<div class="stats-title pull-left">
<h4>Merchants</h4>
</div>
<div class="stats-icon pull-right">
<i class="pe-7s-share fa-4x"></i>
</div>
<div class="m-t-xl">
<h3 class="m-b-xs text-danger">{{ number_format($merchant_count) }}</h3>
<span class="font-bold no-margins">
Merchants
</span>
<!-- <div class="progress m-t-xs full progress-small">
<div style="width: 55%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="55"
role="progressbar" class=" progress-bar progress-bar-success">
<span class="sr-only">35% Complete (success)</span>
</div>
</div> -->
<!-- <div class="row">
<div class="col-xs-6">
<small class="stats-label">Pages / Visit</small>
<h4>7.80</h4>
</div>
<div class="col-xs-6">
<small class="stats-label">% New Visits</small>
<h4>76.43%</h4>
</div>
</div> -->
</div>
</div>
<div class="panel-footer">
Registered Merchants
</div>
</div>
</div>
<div class="col-lg-3">
<div class="hpanel stats">
<div class="panel-body h-200">
<div class="stats-title pull-left">
<h4>Dealers</h4>
</div>
<div class="stats-icon pull-right">
<i class="pe-7s-monitor fa-4x"></i>
</div>
<div class="m-t-xl">
<h1 class="text-success">{{ number_format($dealer_count) }}</h1>
<span class="font-bold no-margins">
<!-- Social users -->
</span>
<br/>
<!-- <small>
Lorem Ipsum is simply dummy text of the printing and <strong>typesetting
industry</strong>. Lorem Ipsum has been.
</small> -->
</div>
</div>
<div class="panel-footer">
Registered Dealers
</div>
</div>
</div>
<div class="col-lg-3">
<div class="hpanel stats">
<div class="panel-body h-200">
<div class="stats-title pull-left">
<h4>Sales (Today)</h4>
</div>
<div class="stats-icon pull-right">
<i class="pe-7s-cash fa-4x"></i>
</div>
<div class="clearfix"></div>
<div class="flot-chart">
<div class="flot-chart-content" id="flot-income-chart"></div>
</div>
<div class="m-t-xs">
<div class="row">
<div class="col-xs-5">
<small class="stat-label">Today</small>
<h4>{{ number_format($current_day_transactions) }} </h4>
</div>
<div class="col-xs-7">
<small class="stat-label">Last week</small>
<h4>{{ number_format($last_weeek_transactions) }} <i class="fa fa-level-up text-success"></i></h4>
</div>
</div>
</div>
</div>
<div class="panel-footer">
Merchant Sales to end users
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="hpanel stats">
<div class="panel-heading">
<div class="panel-tools">
<a class="showhide"><i class="fa fa-chevron-up"></i></a>
<a class="closebox"><i class="fa fa-times"></i></a>
</div>
Top Merchants
</div>
<div class="panel-body list">
<div class="stats-title pull-left">
<h4>Activity</h4>
</div>
<div class="stats-icon pull-right">
<i class="pe-7s-science fa-4x"></i>
</div>
<div class="m-t-xl">
<span class="font-bold no-margins">
Top Merchants by Sales
</span>
<br/>
<!-- <small>
Lorem Ipsum is simply dummy text of the printing simply all dummy text. Lorem Ipsum is
simply dummy text of the printing and typesetting industry. Lorem Ipsum has been.
</small> -->
</div>
<div class="row m-t-md">
<div class="col-lg-6">
<h3 class="no-margins font-extra-bold text-success">
@if($top_merchants->isEmpty() == false)
{{ number_format($top_merchants[0]->total_amount) }}
@else
{{ 'N/A' }}
@endif
</h3>
<div class="font-bold">
@if($top_merchants->isEmpty() == false)
{{ $top_merchants[0]->fullname }}
@else
{{ 'N/A' }}
@endif
</div>
</div>
@if($top_merchants->count() > 1)
<div class="col-lg-6">
<h3 class="no-margins font-extra-bold text-success">
@if($top_merchants->isEmpty() == false)
{{ number_format($top_merchants[1]->total_amount) }}
@else
{{ 'N/A' }}
@endif
</h3>
<div class="font-bold">
@if($top_merchants->isEmpty() == false)
{{ $top_merchants[1]->fullname }}
@else
{{ 'N/A' }}
@endif
</div>
</div>
@endif
</div>
@if($top_merchants->count() > 2)
<div class="row m-t-md">
<div class="col-lg-6">
<h3 class="no-margins font-extra-bold text-warning ">
@if($top_merchants->isEmpty() == false)
{{ number_format($top_merchants[2]->total_amount) }}
@else
{{ '0.00' }}
@endif
</h3>
<div class="font-bold">
@if($top_merchants->isEmpty() == false)
{{ $top_merchants[2]->fullname }}
@else
{{ '0.00' }}
@endif
</div>
</div>
<div class="col-lg-6">
<h3 class="no-margins font-extra-bold text-warning">
@if($top_merchants->isEmpty() == false)
{{ number_format($top_merchants[3]->total_amount) }}
@else
{{ '0.00' }}
@endif
</h3>
<div class="font-bold">
@if($top_merchants->isEmpty() == false)
{{ $top_merchants[3]->fullname }}
@else
{{ 'N/A' }}
@endif
</div>
</div>
</div>
@endif
</div>
<div class="panel-footer">
<!-- This is standard panel footer -->
</div>
</div>
</div>
<div class="col-lg-6">
<div class="hpanel">
<div class="panel-heading">
<div class="panel-tools">
<a class="showhide"><i class="fa fa-chevron-up"></i></a>
<a class="closebox"><i class="fa fa-times"></i></a>
</div>
Recent Dealer Sales to Merchants
</div>
<div class="panel-body list">
<div class="table-responsive project-list">
<table class="table table-striped">
<thead>
<tr>
<th>Merchant</th>
<th>Amount (MK)</th>
<th>Status</th>
<th>Dealer Name</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($merchant_topups as $row)
<tr>
<td>{{ $row->merchantInfo->fullname }}</td>
<td>{{ number_format($row->amount) }}</td>
<td class="<?php echo ($row->status == 'Success') ? "text-success" : "text-warning"; ?>">{{ $row->status }}</td>
<td>{{ ucfirst($row->orgUserInfo->name) }}</td>
<td>{{ Carbon\Carbon::parse($row->created_at)->format('F d, Y') }}</td>
</tr>
@empty
<tr>
<td colspan="5">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="hpanel">
<div class="panel-heading">
<div class="panel-tools">
<a class="showhide"><i class="fa fa-chevron-up"></i></a>
<a class="closebox"><i class="fa fa-times"></i></a>
</div>
Admin Activity
</div>
<div class="panel-body list">
<div class="pull-right">
<!-- <a href="" class="btn btn-xs btn-default">Today</a> -->
<!-- <a href="" class="btn btn-xs btn-default">Month</a> -->
</div>
<div class="panel-title">Recent Sales</div>
<small class="fo">Sale from Admin to Dealers</small>
<div class="list-item-container">
@forelse ($dealer_topups as $row)
<div class="list-item">
<h3 class="no-margins font-extra-bold text-success">MK{{ number_format($row->amount) }}</h3>
<small>Dealer : {{ $row->orgInfo->name }}</small>
<div class="pull-right font-bold">
&nbsp;
{{ $row->created_at }}
<!-- <i class="fa fa-date text-success"></i> -->
</div>
</div>
@empty
<tr>
<td colspan="5">No Data</td>
</tr>
@endforelse
</div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<!-- third party js -->
<!-- <script src="{{ url('public/assets/js/vendor/apexcharts.min.js')}}"></script> -->
<!-- <script src="{{ url('public/assets/js/vendor/jquery-jvectormap-1.2.2.min.js')}}"></script> -->
<!-- <script src="{{ url('public/assets/js/vendor/jquery-jvectormap-world-mill-en.js')}}"></script> -->
<!-- third party js ends -->
<!-- demo app -->
<!-- <script src="{{ url('public/assets/js/pages/demo.dashboard.js')}}"></script> -->
<!-- end demo js-->
@endsection

View File

@@ -0,0 +1,149 @@
@extends('layouts.merchant')
@section('page-title')
Merchant | Dashboard
@endsection
@section('page-content')
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<form class="form-inline">
<div class="form-group">
<!-- <div class="input-group">
<input type="text" class="form-control form-control-light" id="dash-daterange">
<div class="input-group-append">
<span class="input-group-text bg-info border-info text-white">
<i class="mdi mdi-calendar-range font-13"></i>
</span>
</div>
</div> -->
</div>
</form>
</div>
<h4 class="page-title">Dashboard</h4>
</div>
</div>
</div>
<!-- end page title -->
{{-- Alert --}}
@include('layouts.alert')
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
<h6 id="transaction-data" class="d-none">{{ $transactions_graph }}</h6>
</div>
<h3 class="header-title mb-3" style="padding: 15px; background: gainsboro; color: #000;">Current Balance {{ number_format($current_balance) }}</h3>
<hr>
<h4 class="header-title mb-3">Instant Top Up</h4>
<form action="{{ url('merchant/topup') }}" method="POST" id="merchantTopUpForm" >
{{csrf_field()}}
<div class="form-row">
<div class="form-group col-md-12">
<label for="phoneNumber" class="col-form-label">Phone Number</label>
<input type="text" required class="form-control" name="phone_number" value="{{ old('phone_number') }}" id="phoneNumber" placeholder="Phone Number">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label for="amount" class="col-form-label">Amount</label>
<input type="number" required class="form-control" name="amount" value="{{ old('amount') }}" id="amount" placeholder="Amount">
</div>
</div>
<button type="submit" class="btn btn-primary btn-block">Submit </button>
<button type="reset" class="btn btn-danger btn-block">Reset</button>
</form>
</div>
</div>
<!-- <a href="{{url('merchant/showtopup')}}" class="btn btn-lg btn-success">Top Up A Number <i class="mdi mdi-send"></i></a> -->
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
{{-- <a href="" class="btn btn-sm btn-link float-right mb-3">Export
<i class="mdi mdi-download ml-1"></i>
</a> --}}
<h3 class="header-title mt-2">Total Transactions : {{ $transaction_count }}</h3>
<h4 class="header-title mt-2">Recent Transactions</h4>
<div class="table-responsive">
<table class="table table-centered table-nowrap table-hover mb-0">
<tbody>
@forelse ($transactions as $transaction)
<tr>
<td>
<h5 class="font-14 my-1 font-weight-normal">{{ $transaction->msisdn }}</h5>
<span class="text-muted font-13"><strong>Phone Number</strong></span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">K {{$transaction->amount}}</h5>
<span class="text-muted font-13"><strong>Amount</strong></span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">{{$transaction->status}}</h5>
<span class="text-muted font-13"><strong>Status</strong></span>
</td>
<td>
<!-- <h5 class="font-14 my-1 font-weight-normal">{{ Carbon\Carbon::parse($transaction->created_at)->format('F dS Y') }}</h5> -->
<h5 class="font-14 my-1 font-weight-normal">{{ $transaction->created_at }}</h5>
<span class="text-muted font-13"><strong>Date</strong></span>
</td>
</tr>
@empty
@endforelse
</tbody>
</table>
</div> <!-- end table-responsive-->
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
</div>
<!-- end row -->
@endsection
@section('page-js')
<!-- third party js -->
<!-- <script src="{{ url('public/assets/js/vendor/apexcharts.min.js')}}"></script> -->
<!-- <script src="{{ url('public/assets/js/vendor/jquery-jvectormap-1.2.2.min.js')}}"></script> -->
<!-- <script src="{{ url('public/assets/js/vendor/jquery-jvectormap-world-mill-en.js')}}"></script> -->
<!-- third party js ends -->
<!-- demo app -->
<!-- <script src="{{ url('public/assets/js/pages/demo.dashboard.js')}}"></script> -->
<!-- end demo js-->
<script>
$(document).ready(function(){
$("#merchantTopUpForm").submit(function(evt){
var userAction = confirm('You are about to submit this top up');
if(userAction == false){
evt.preventDefault();
}
});
});
</script>
@endsection

View File

@@ -0,0 +1,132 @@
@extends('layouts.organisation')
@section('page-title')
Organisation | Dashboard
@endsection
@section('page-content')
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<form class="form-inline">
<div class="form-group">
<!-- <div class="input-group">
<input type="text" class="form-control form-control-light" id="dash-daterange">
<div class="input-group-append">
<span class="input-group-text bg-info border-info text-white">
<i class="mdi mdi-calendar-range font-13"></i>
</span>
</div>
</div> -->
</div>
</form>
</div>
<h4 class="page-title">Dashboard</h4>
</div>
</div>
</div>
<!-- end page title -->
{{-- Alert --}}
@include('layouts.alert')
<div class="row">
<div class="col-md-6">
<div class="card">
<!-- top up merchants here -->
</div>
<div class="card widget-flat">
<div class="card-body">
<div class="float-right">
<i class="mdi mdi-cart-plus widget-icon bg-danger-lighten text-danger"></i>
</div>
<h5 class="text-muted font-weight-normal mt-0" title="Number of Orders">Current Balance</h5>
<h3 class="mt-3 mb-3">{{ number_format($organisation->balance, 2) }}</h3>
<!-- <p class="mb-0 text-muted">
<span class="text-danger mr-2"><i class="mdi mdi-arrow-down-bold"></i> 1.08%</span>
<span class="text-nowrap">Since last month</span>
</p> -->
<form action="{{ url('organisation/topup') }}" method="POST" >
{{csrf_field()}}
<div class="form-row">
<div class="form-group col-md-12">
<label for="merchant" class="col-form-label">Select Account to Top Up</label>
<select required class="form-control" name="merchant" id="merchant" placeholder="Merchant" >
<option>-- Select Account --</option>
<?php foreach ($merchants as $row): ?>
<option value="{{ $row->id }}">{{ $row->fullname }} ({{ $row->phone }}) </option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label for="amount" class="col-form-label">Amount</label>
<input type="number" required class="form-control" name="amount" value="{{ old('amount') }}" id="amount" placeholder="Amount">
</div>
</div>
<button type="submit" class="btn btn-primary btn-block">Submit </button>
<button type="reset" class="btn btn-danger btn-block">Reset</button>
</form>
</div> <!-- end card-body-->
</div> <!-- end card-->
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h3 class="header-title mt-2">Total Transactions : {{ $transaction_count }}</h3>
<h4 class="header-title mt-2">Recent Transactions</h4>
<div class="table-responsive">
<table class="table table-centered table-nowrap table-hover mb-0">
<tbody>
@forelse ($merchant_topups as $transaction)
<tr>
<td>
<h5 class="font-14 my-1 font-weight-normal">@if($transaction->merchantInfo) {{ $transaction->merchantInfo->fullname }} @else N/A @endif</h5>
<span class="text-muted font-13"><strong>Merchant</strong></span>
</td>
<td>
<h5 class="font-14 my-1 font-weight-normal">K {{ $transaction->amount }}</h5>
<span class="text-muted font-13"><strong>Amount</strong></span>
</td>
<td>
<!-- <h5 class="font-14 my-1 font-weight-normal">{{ Carbon\Carbon::parse($transaction->created_at)->format('F dS Y') }}</h5> -->
<h5 class="font-14 my-1 font-weight-normal">{{ $transaction->created_at }}</h5>
<span class="text-muted font-13"><strong>Date</strong></span>
</td>
</tr>
@empty
@endforelse
</tbody>
</table>
</div> <!-- end table-responsive-->
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
</div>
<!-- end row -->
@endsection
@section('page-js')
<!-- third party js -->
<script src="{{ url('public/assets/js/vendor/apexcharts.min.js')}}"></script>
<script src="{{ url('public/assets/js/vendor/jquery-jvectormap-1.2.2.min.js')}}"></script>
<script src="{{ url('public/assets/js/vendor/jquery-jvectormap-world-mill-en.js')}}"></script>
<!-- third party js ends -->
<!-- demo app -->
<script src="{{ url('public/assets/js/pages/demo.dashboard.js')}}"></script>
<!-- end demo js-->
@endsection

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Page title -->
<title>@yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
@yield('page-css')
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="fixed-navbar sidebar-scroll">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with Click Airtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
@include('dealer_layouts.topnav')
@include('dealer_layouts.sidebar')
<!-- Main Wrapper -->
<div id="wrapper">
@include('dealer_layouts.normalheader')
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd</span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Page title -->
<title>@yield('page_title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
</head>
<body class="blank">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with ClickAirtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="color-line"></div>
<div class="login-container">
@yield('page_content')
<div class="row">
<div class="col-md-12 text-center">
<strong></strong> {{ date('Y') }} Click Mobile Ltd. <br/>
</div>
</div>
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
</body>
</html>

View File

@@ -0,0 +1,91 @@
<nav x-data="{ open: false }" class="bg-white border-b border-gray-100">
<!-- Primary Navigation Menu -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('organisation.dashboard') }}">
<x-application-logo class="block h-10 w-auto fill-current text-gray-600" />
</a>
</div>
<!-- Navigation Links -->
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('organisation.dashboard')">
{{ __('Dashboard') }}
</x-nav-link>
</div>
</div>
<!-- Settings Dropdown -->
<div class="hidden sm:flex sm:items-center sm:ml-6">
<x-dropdown align="right" width="48">
<x-slot name="trigger">
<button class="flex items-center text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out">
<div>user name here</div>
<div class="ml-1">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div>
</button>
</x-slot>
<x-slot name="content">
<!-- Authentication -->
<form method="POST" action="{{ route('organisation.logout') }}">
@csrf
<x-dropdown-link :href="route('organisation.logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-dropdown-link>
</form>
</x-slot>
</x-dropdown>
</div>
<!-- Hamburger -->
<div class="-mr-2 flex items-center sm:hidden">
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
<!-- Responsive Navigation Menu -->
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
<div class="pt-2 pb-3 space-y-1">
<x-responsive-nav-link :href="route('organisation.dashboard')" :active="request()->routeIs('organisation.dashboard')">
{{ __('Dashboard') }}
</x-responsive-nav-link>
</div>
<!-- Responsive Settings Options -->
<div class="pt-4 pb-1 border-t border-gray-200">
<div class="px-4">
<div class="font-medium text-base text-gray-800">Name here</div>
<div class="font-medium text-sm text-gray-500">Phone here</div>
</div>
<div class="mt-3 space-y-1">
<!-- Authentication -->
<form method="POST" action="{{ url('organisation/logout') }}">
@csrf
<x-responsive-nav-link :href="route('organisation.logout')" onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-responsive-nav-link>
</form>
</div>
</div>
</div>
</nav>

View File

@@ -0,0 +1,27 @@
<div class="normalheader small-header">
<div class="hpanel">
<div class="panel-body">
<a class="small-header-action" href="">
<div class="clip-header">
<i class="fa fa-arrow-up"></i>
</div>
</a>
<div id="hbreadcrumb" class="pull-right m-t-lg">
<ol class="hbreadcrumb breadcrumb">
<li><a href="{{ url('organisation') }}">Dashboard</a></li>
<!-- <li>
<span>Tables</span>
</li> -->
<li class="active">
<span>{{ $page_title }}</span>
</li>
</ol>
</div>
<h2 class="font-light m-b-xs">
{{ $page_title }}
</h2>
<!-- <small>Examples of various designs of tables.</small> -->
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
@if ($errors->any())
<ul class="alert alert-danger" style="padding-left:30px;">
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
@endif

View File

@@ -0,0 +1,27 @@
<!-- Navigation -->
<aside id="menu">
<div id="navigation">
<div class="profile-picture">
<a href="{{ url('/') }}">
<!-- <img src="{{ url('public/theme_assets/images/click-airtime-logo.jpg') }}" class="img-circle m-b" alt="logo"> -->
</a>
<div class="stats-label text-color">
<span class="font-extra-bold font-uppercase text-info">{{ session('current_org_user.name') }}</span>
<div id="sparkline1" class="small-chart m-t-sm text-success">{{ session('current_org_user.org_name') }}</div>
</div>
</div>
<ul class="nav" id="side-menu">
<li class="<?php echo ($page_title == 'Dashboard') ? "active" : ""; ?>">
<a href="{{ url('organisation/landing') }}"> <span class="nav-label">Dashboard</span></a>
</li>
<li class="<?php echo ($page_title == 'My Top Ups') ? "active" : ""; ?>">
<a href="{{ url('organisation/mytopups') }}"> <span class="nav-label">My Top Ups</span></a></li>
<li class="<?php echo ($page_title == 'Dealer Transactions') ? "active" : ""; ?>">
<a href="{{ url('organisation/transactions') }}"> <span class="nav-label">Transactions</span></a></li>
<li class="<?php echo ($page_title == 'DealerActivity Log') ? "active" : ""; ?>">
<a href="{{ url('organisation/activity') }}"> <span class="nav-label">Activity Logs</span></a>
</li>
</ul>
</div>
</aside>

View File

@@ -0,0 +1,45 @@
<div id="header">
<div class="color-line">
</div>
<div id="logo" class="light-version">
<!-- <span>Airtime Sales</span> -->
<img src="{{ url('public/theme_assets/images/click-airtime-logo-removebg-preview.png') }}" class="" width="80px" alt="logo">
</div>
<nav role="navigation">
<div class="header-link hide-menu"><i class="fa fa-bars"></i></div>
<div class="small-logo">
<span class="text-primary">Airtime Sales</span>
</div>
<div class="mobile-menu">
<button type="button" class="navbar-toggle mobile-menu-toggle" data-toggle="collapse" data-target="#mobile-collapse">
<i class="fa fa-chevron-down"></i>
</button>
<div class="collapse mobile-navbar" id="mobile-collapse">
<ul class="nav navbar-nav">
<!-- <li>
<a class="" href="">Login</a>
</li> -->
<li>
<a class="" href="{{ url('organisation/logout') }}">Logout</a>
</li>
<li>
<!-- <a class="" href="">Profile</a> -->
</li>
</ul>
</div>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav no-borders">
<li class="dropdown">
<a href="{{ url('organisation/logout') }}" class="" title="Logout">
<i class="pe-7s-upload pe-rotate-90 text-danger"></i>
</a>
</li>
</ul>
</div>
</nav>
</div>

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
</head>
<body>
<div class="">
<img src="{!! url('public/assets/img/click-banner.png') !!}" alt="Click Mobile Banner Logo">
</div>
<h2>{{ date('F d, Y') }} </h2>
<h3>Login OTP</h3>
Hello {{ $orgUser->name }},<br>
<p>
To process top ups you are required to verify your identify. <br>
Use the code below to complete the process.
</b>
<p>
<strong>
{{ strtoupper($otp) }}
</strong>
</p>
</p>
<br>
<br>
<h3>Why you received this email</h3>
<p>
Click Mobile security policy requires email verification whenever an attempt is made to sign in to any of our systems systems.
You cannot gain access until you verify.
</p>
<p>
If you did not make this request, please disregard this email
</p>
<p>
Sincerely, <br>
Click Mobile Airtime Sales
</p>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<html>
<head>
<!-- Your title goes here -->
<title>Email</title>
<!-- End title -->
</head>
<!-- You can change background colour here -->
<body style="text-align: center; margin: 0; padding-top: 10px; padding-bottom: 10px; padding-left: 0; padding-right: 0; -webkit-text-size-adjust: 100%;background-color: #f2f4f6; color: #000000" align="center">
<!-- Fallback force center content -->
<div style="text-align: center;">
<h1> {{$record['message']}} </h2>
</div>
</body>
</html>

View File

@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Welcome Email</title>
</head>
<body>
<h1>Hello, {{ $details['name'] }}!</h1>
</body>
</html>

View File

@@ -0,0 +1,104 @@
@extends('layouts.landing_master')
@section('page-title')
Landing Page
@endsection
@section('page-content')
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Homer - Responsive Admin Theme</h1><p>Special Admin Theme for small and medium webapp with very clean and aesthetic style and feel. </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- <nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.html" class="navbar-brand">HOMER</a>
<div class="brand-desc">
Landing page for Homer app
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a class="page-scroll" href="landing_page.html#page-top">Home</a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#components">UI</a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#features">Features</a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#team">Team</a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#pricing">Pricing </a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#clients">Clients </a></li>
<li><a class="page-scroll" page-scroll href="landing_page.html#contact">Contact</a></li>
</ul>
</div>
</div>
</nav> -->
<header id="page-top">
<div class="container">
<div class="heading">
<h1>
Welcome to Click Airtime Dealer & Merchant Portal
</h1>
<span></span>
<h3>Select an option to proceed.</h3>
<!-- <p class="small">
Lorem Ipsum is simply dummy te the simply dummy text of the ypesetting.
</p> -->
<div class="" style="margin-top: 60px;">
<a href="{{('dealer') }}" class="btn btn-success btn-lg"><i class="fa fa-address-book-o"></i> Dealer</a>
&nbsp; &nbsp; &nbsp; &nbsp;
<a href="{{('merchant') }}" class="btn btn-warning btn-lg"><i class="fa fa-address-book"></i> Merchant</a>
</div>
</div>
</div>
</header>
<section>
<div class="container">
<div class="row">
<div class="col-md-4">
<h4>Dealers and Merchants</h4>
<p>Click Airtime offers a simple and effective platform to help both Dealers and Merchants grow their airtime businesses.</p>
<ol>
<li>Dealers handle larger volumes and often manage merchants.</li>
<li>Merchants sell airtime directly to their customers.</li>
</ol>
<p>
Whether you are running a big operation or serving local customers, our platform gives you the tools you need including instant top-ups, real-time tracking, and competitive rates.
</p>
</p>
<!-- <p><a class="navy-link btn btn-sm" href="landing_page.html#" role="button">Learn more</a></p> -->
</div>
<div class="col-md-4">
<h4>How to become a dealer</h4>
<p>It's easy to become a Dealer with Click Airtime. </p>
<p>As a Dealer, you can <em><u>purchase airtime in bulk</u></em>, <em><u>manage your own group of merchants</u><em>, and <em><u>earn commissions</u></em> based on your sales performance. </p>
<p>
Heres how to get started: Register on our portal, once approved, you will get full access to the Dealer dashboard, complete with advanced tools and real-time insights.</p>
<p><a class="navys-link btn btn-success btn-sm" href="{{ url('dealer/register') }}" role="button">Register Here</a></p>
</div>
<div class="col-md-4">
<h4>How to become a Merchant</h4>
<p>Start earning by selling airtime in your community with Click Airtime. </p>
<p>
As a Merchant, you will get instant airtime delivery, real-time tracking, and an easy-to-use platform. Getting started is quick and simple: Sign up on our portal and start selling airtime in just minutes.</p>
<p> Great for <u>shop owners</u>, <u>mobile money agents</u>, or <u>anyone looking to make extra income.</u></p>
<!-- <p><a class="navy-link btn btn-sm" href="landing_page.html#" role="button">Learn more</a></p> -->
<p><a class="navy-links btn btn-sm btn-warning" href="{{ url('merchant/register') }}" role="button">Sign Up Here</a></p>
</div>
</div>
</div>
</section>
@endsection

View File

@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<!-- Page title -->
<title>Click Airtime | @yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/custom_fixed_tables.css') }}">
<link rel="stylesheet" href="{{ url('public/css/jquery-confirm.css') }}">
@yield('page-css')
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="fixed-navbar sidebar-scroll">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with ClickAirtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
@include('layouts.topnav')
@include('layouts.sidebar')
<!-- Main Wrapper -->
<div id="wrapper">
@if($page_title !== 'Dashboard')
@include('layouts.normalheader')
@endif
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd</span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/moment/moment.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<script src="{{ url('public/js/jquery-confirm.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,55 @@
@if ($errors->any())
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0 fade show"
role="alert">
<button type="button" class="close" data-dismiss="alert"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</div>
@endif
@if (Session::has('admin-error') || Session::has('admin-sucsess') || Session::has('success_message') || Session::has('error_message'))
@yield('name')
<div class="row">
<div class="col-xl-6">
<div class="tab-content">
<div class="tab-pane show active" id="dismissing-alerts-preview">
@if (Session::has('admin-sucsess'))
<div class="alert alert-success bg-success text-white border-0 fade show" role="alert">
<strong>{{ Session::get('admin-sucsess') }}</strong>
</div>
@endif
@if (Session::has('admin-error'))
<div class="alert alert-danger bg-danger text-white border-0 fade show" role="alert">
{{ Session::get('admin-error')}}
</div>
@endif
</div> <!-- end preview-->
@if(Session::has('success_message'))
<div style="text-align: center" class="alert alert-success notification-alert">
{{ Session::get('success_message') }}
</div>
@elseif(Session::has('error_message'))
<div style="text-align: center" class="alert alert-danger notification-alert">
{{ Session::get('error_message') }}
</div>
@endif
</div> <!-- end tab-content-->
</div> <!-- end col-->
</div>
@endif

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-100">
@include('layouts.navigation')
<!-- Page Heading -->
<header class="bg-white shadow">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
</div>
</header>
<!-- Page Content -->
<main>
{{ $slot }}
</main>
</div>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
</head>
<body>
<div class="font-sans text-gray-900 antialiased">
{{ $slot }}
</div>
</body>
</html>

View File

@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<!-- Page title -->
<title>Click Airtime | @yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico') }}">
@yield('page-css')
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/custom_fixed_tables.css') }}">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="landing-page">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with ClickAirtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
<!-- Main Wrapper -->
<div id="wrapper">
@if($page_title !== 'Dashboard')
@endif
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd | <a href="{{ ('admin') }}">Admin</a></span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/sparkline/index.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
@yield('page-js')
<body class="landing-page">
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Page title -->
<title>@yield('page_title')</title>
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css" />
<style>
/* Ensures the phone dropdown takes up the full width of the Bootstrap form-control */
.iti { width: 100%; }
</style>
</head>
<body class="blank">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Homer - Responsive Admin Theme</h1><p>Special Admin Theme for small and medium webapp with very clean and aesthetic style and feel. </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="color-line"></div>
<div class="login-container">
@yield('page_content')
<div class="row">
<div class="col-md-12 text-center">
<strong></strong> {{ date('Y') }} Click Mobile Ltd. <br/>
</div>
</div>
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/intlTelInput.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<!-- Page title -->
<title>@yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
@yield('page-css')
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link href="{!! url('public/css/jquery-confirm.min.css') !!}" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/custom_fixed_tables.css') }}">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="fixed-navbar sidebar-scroll">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with ClickAirtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
@include('merch_layouts.topnav')
@include('merch_layouts.sidebar')
<!-- Main Wrapper -->
<div id="wrapper">
@include('merch_layouts.normalheader')
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd</span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
<script src="{!! url('public/js/jquery-confirm.min.js') !!}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,250 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@yield('page-title')</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<!-- App favicon -->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
@yield('page-css')
<!-- App css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/4.9.95/css/materialdesignicons.css" type="text/css">
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v2.1.9/css/unicons.css">
<link href="{{ url('public/assets/css/app-creative.min.css')}}" rel="stylesheet" type="text/css" id="light-style" />
<link href="{{ url('public/assets/css/app-creative-dark.min.css')}}" rel="stylesheet" type="text/css" id="dark-style" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/custom_fixed_tables.css') }}">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="loading" data-layout="topnav" data-layout-config='{"layoutBoxed":false,"darkMode":false,"showRightSidebarOnStart": true}'>
<!-- Begin page -->
<div class="wrapper">
<!-- ============================================================== -->
<!-- Start Page Content here -->
<!-- ============================================================== -->
<div class="content-page">
<div class="content">
<!-- Topbar Start -->
<div class="navbar-custom topnav-navbar topnav-navbar-dark">
<div class="container-fluid">
<!-- LOGO -->
<a href="{{ url('merchant') }}" class="topnav-logo">
<span class="topnav-logo-lg">
<img src="{{ url('public/assets/images/logo-light.png') }}" alt="" height="16">
</span>
<span class="topnav-logo-sm">
<img src="{{ url('public/assets/images/logo_sm_dark.png')}}" alt="" height="16">
</span>
</a>
<ul class="list-unstyled topbar-right-menu float-right mb-0">
<li class="dropdown notification-list">
<a class="nav-link dropdown-toggle arrow-none" data-toggle="dropdown" href="#" id="topbar-notifydrop" role="button" aria-haspopup="true" aria-expanded="false">
<i class="dripicons-bell noti-icon"></i>
<span class="noti-icon-badge"></span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-lg" aria-labelledby="topbar-notifydrop">
<!-- item-->
<div class="dropdown-item noti-title">
<h5 class="m-0">
<span class="float-right">
<a href="javascript: void(0);" class="text-dark">
<small>Clear All</small>
</a>
</span>Notification
</h5>
</div>
<div style="max-height: 230px;" data-simplebar>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-primary">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Caleb Flakelar commented on Admin
<small class="text-muted">1 min ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-info">
<i class="mdi mdi-account-plus"></i>
</div>
<p class="notify-details">New user registered.
<small class="text-muted">5 hours ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="{{ url('public/assets/images/users/avatar-2.jpg') }}" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Cristina Pride</p>
<p class="text-muted mb-0 user-msg">
<small>Hi, How are you? What about our next meeting</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-primary">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Caleb Flakelar commented on Admin
<small class="text-muted">4 days ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="{{ url('public/assets/images/users/avatar-4.jpg')}}" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Karen Robinson</p>
<p class="text-muted mb-0 user-msg">
<small>Wow ! this admin looks good and awesome design</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-info">
<i class="mdi mdi-heart"></i>
</div>
<p class="notify-details">Carlos Crouch liked
<b>Admin</b>
<small class="text-muted">13 days ago</small>
</p>
</a>
</div>
<!-- All-->
<a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
View All
</a>
</div>
</li>
<li class="dropdown notification-list">
<a class="nav-link dropdown-toggle nav-user arrow-none mr-0" data-toggle="dropdown" id="topbar-userdrop" href="#" role="button" aria-haspopup="true"
aria-expanded="false">
<span>
<span class="account-user-name">{{ session('merchant')->fullname }}</span>
<span class="account-position">Merchant</span>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-animated topbar-dropdown-menu profile-dropdown" aria-labelledby="topbar-userdrop">
<!-- item-->
<a href="{{url('merchant/logout')}}" class="dropdown-item notify-item">
<i class="mdi mdi-logout mr-1"></i>
<span>Logout</span>
</a>
</div>
</li>
</ul>
<a class="navbar-toggle" data-toggle="collapse" data-target="#topnav-menu-content">
<div class="lines">
<span></span>
<span></span>
<span></span>
</div>
</a>
</div>
</div>
<!-- end Topbar -->
<div class="topnav shadow-sm">
<div class="container-fluid">
<nav class="navbar navbar-light navbar-expand-lg topnav-menu">
<div class="collapse navbar-collapse" id="topnav-menu-content">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link" href="{{ url('/merchant') }}">
<i class="uil-dashboard mr-1"></i>Dashboard
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="{{ url('merchant/transactions') }}">
<i class="uil-apps mr-1"></i>Transactions
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('/merchant/logout') }}">
<i class="uil-power mr-1"></i>Logout
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<!-- Start Content-->
<div class="container-fluid">
@yield('page-content')
</div>
<!-- container -->
</div>
<!-- content -->
<!-- Footer Start -->
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
{{ date('Y') }} Click Mobile Ltd.
</div>
{{-- <div class="col-md-6">
<div class="text-md-right footer-links d-none d-md-block">
<a href="javascript: void(0);">About</a>
<a href="javascript: void(0);">Support</a>
<a href="javascript: void(0);">Contact Us</a>
</div>
</div> --}}
</div>
</div>
</footer>
<!-- end Footer -->
</div>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
</div>
<!-- END wrapper -->
<!-- bundle -->
<script src="{{ url('public/assets/js/vendor.min.js')}}"></script>
<script src="{{ url('public/assets/js/app.min.js')}}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,92 @@
<nav x-data="{ open: false }" class="bg-white border-b border-gray-100">
<!-- Primary Navigation Menu -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('dashboard') }}">
<x-application-logo class="block h-10 w-auto fill-current text-gray-600" />
</a>
</div>
<!-- Navigation Links -->
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
{{ __('Dashboard') }}
</x-nav-link>
</div>
</div>
<!-- Settings Dropdown -->
<div class="hidden sm:flex sm:items-center sm:ml-6">
<x-dropdown align="right" width="48">
<x-slot name="trigger">
<button class="flex items-center text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out">
<div>{{ Auth::user()->name }}</div>
<div class="ml-1">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div>
</button>
</x-slot>
<x-slot name="content">
<!-- Authentication -->
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-dropdown-link :href="route('logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-dropdown-link>
</form>
</x-slot>
</x-dropdown>
</div>
<!-- Hamburger -->
<div class="-mr-2 flex items-center sm:hidden">
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
<!-- Responsive Navigation Menu -->
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
<div class="pt-2 pb-3 space-y-1">
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
{{ __('Dashboard') }}
</x-responsive-nav-link>
</div>
<!-- Responsive Settings Options -->
<div class="pt-4 pb-1 border-t border-gray-200">
<div class="px-4">
<div class="font-medium text-base text-gray-800">{{ Auth::user()->name }}</div>
<div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
</div>
<div class="mt-3 space-y-1">
<!-- Authentication -->
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-responsive-nav-link :href="route('logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-responsive-nav-link>
</form>
</div>
</div>
</div>
</nav>

View File

@@ -0,0 +1,27 @@
<div class="normalheader ">
<div class="hpanel">
<div class="panel-body">
<a class="small-header-action" href="">
<div class="clip-header">
<i class="fa fa-arrow-up"></i>
</div>
</a>
<div id="hbreadcrumb" class="pull-right m-t-lg">
<ol class="hbreadcrumb breadcrumb">
<li><a href="">Dashboard</a></li>
<!-- <li>
<span>Tables</span>
</li> -->
<li class="active">
<span>{{ ucfirst($page_title) }}</span>
</li>
</ol>
</div>
<h2 class="font-light m-b-xs">
{{ ucfirst($page_title) }}
</h2>
<!-- <small>Examples of various designs of tables.</small> -->
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
@if ($errors->any())
<ul class="alert alert-danger" style="padding-left:30px;">
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
@endif

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<!-- Page title -->
<title>@yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
@yield('page-css')
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="fixed-navbar sidebar-scroll">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Airtime </h1><p>Instant Airtime Top-up, anywhere with ClickAirtime </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
@include('topnav')
@include('aside')
<!-- Main Wrapper -->
<div id="wrapper">
@include('normalheader')
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd</span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,40 @@
<!-- Navigation -->
<aside id="menu">
<div id="navigation">
<div class="profile-picture">
<a href="index.html">
<!-- <img src="{{ url('public/theme_assets/images/click-airtime-logo.jpg') }}" class="img-circle m-b" alt="logo"> -->
</a>
<div class="stats-label text-color">
<span class="font-extra-bold font-uppercase">{{ \Auth::user()->name }}</span>
<div id="sparkline1" class="small-chart m-t-sm">Admin User</div>
</div>
</div>
<ul class="nav" id="side-menu">
<li>
<a href="{{ url('admin') }}"> <span class="nav-label">Dashboard</span></a>
</li>
<li>
<a href="{{ url('admin/organisations') }}"> <span class="nav-label">Dealers</span>
<!-- <span class="label label-warning pull-right">24</span> -->
</a>
<li>
<a href="{{ url('admin/dealer-transactions') }}"> <span class="nav-label">Admin Transactions</span>
<!-- <span class="label label-warning pull-right">24</span> -->
</a>
</li>
<li><a href="{{ url('admin/dealersales') }}"> <span class="nav-label">Dealer Sales</span></a></li>
<li><a href="{{ url('admin/merchants') }}"> <span class="nav-label">Merchants</span></a></li>
<li><a href="{{ url('admin/merchantsales') }}"> <span class="nav-label">Merchant Sales</span></a></li>
<li>
<a href="{{ url('admin/users') }}"> <span class="nav-label">Admin Users</span></a>
</li>
<li>
<a href="{{ url('admin/activity') }}"> <span class="nav-label">Activity Logs</span></a>
</li>
</ul>
</div>
</aside>

View File

@@ -0,0 +1,100 @@
<div id="header">
<div class="color-line">
</div>
<div id="logo" class="light-version">
<!-- <span>Airtime Sales</span> -->
<img src="{{ url('public/theme_assets/images/click-airtime-logo-removebg-preview.png') }}" class="" width="80px" alt="logo">
</div>
<nav role="navigation">
<div class="header-link hide-menu"><i class="fa fa-bars"></i></div>
<div class="small-logo">
<span class="text-primary">Airtime Sales</span>
</div>
<div class="mobile-menu">
<button type="button" class="navbar-toggle mobile-menu-toggle" data-toggle="collapse" data-target="#mobile-collapse">
<i class="fa fa-chevron-down"></i>
</button>
<div class="collapse mobile-navbar" id="mobile-collapse">
<ul class="nav navbar-nav">
<li>
<a class="" href="">Login</a>
</li>
<li>
<a class="" href="{{ url('logout') }}">Logout</a>
</li>
<li>
<a class="" href="">Profile</a>
</li>
</ul>
</div>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav no-borders">
<li class="dropdown">
<a class="dropdown-toggle" href="" data-toggle="dropdown">
<i class="pe-7s-keypad"></i>
</a>
<div class="dropdown-menu hdropdown bigmenu animated flipInX">
<table>
<tbody>
<tr>
<td>
<a href="{{ url('admin') }}">
<i class="pe pe-7s-portfolio text-info"></i>
<h5>Dashboard</h5>
</a>
</td>
<td>
<a href="{{ url('admin/organisations') }}">
<i class="pe pe-7s-mail text-warning"></i>
<h5>Dealers</h5>
</a>
</td>
<td>
<a href="{{ url('admin/users') }}">
<i class="pe pe-7s-users text-success"></i>
<h5>Admin Users</h5>
</a>
</td>
</tr>
<tr>
<td>
<a href="{{ url('admin/settings') }}">
<i class="pe pe-7s-comment text-info"></i>
<h5>Settings</h5>
</a>
</td>
<td>
<a href="{{ url('admin/dealersales') }}">
<i class="pe pe-7s-graph1 text-danger"></i>
<h5>Dealer Sales</h5>
</a>
</td>
<td>
<a href="{{ url('admin/merchantsales') }}">
<i class="pe pe-7s-box1 text-success"></i>
<h5>Merchant Sales</h5>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</li>
<li>
<a href="" id="sidebar" class="right-sidebar-toggle">
<i class="pe-7s-upload pe-7s-news-paper"></i>
</a>
</li>
<li class="dropdown">
<a href="{{ url('logout') }}">
<i class="pe-7s-upload pe-rotate-90"></i>
</a>
</li>
</ul>
</div>
</nav>
</div>

View File

@@ -0,0 +1,50 @@
@extends('layouts.login')
@section('page_title')
Airtime Sales | Admin Login
@endsection
@section('page_content')
<div class="row">
<div class="col-md-12">
<div class="text-center m-b-md">
<h3 class="text-dark-50 text-center mt-0 font-weight-bold">Click Mobile Airtime Sales</h3>
<h4 class="text-dark-50 text-center mt-0 font-weight-bold">Admin Login</h4>
<!-- <small>This is the best app ever!</small> -->
<div class="text-center w-75 m-auto">
<!-- <p class="text-muted mb-4">Admin Panel Login</p> -->
@if (Session::has('login-error'))
<p class=" text-danger mb-4"> {{ Session::get('login-error') }} </p>
@endif
@include('commons.notifications')
</div>
</div>
<div class="hpanel">
<div class="panel-body">
<form action="{{ url('login_user') }}" id="loginForm" method="POST">
{{csrf_field()}}
<div class="form-group">
<label class="control-label" for="username">Username</label>
<input type="text" placeholder="example@gmail.com" title="Please enter you username" required="" value="" name="email" id="username" class="form-control">
<span class="help-block small">Your unique username</span>
</div>
<div class="form-group">
<label class="control-label" for="password">Password</label>
<input type="password" title="Please enter your password" placeholder="******" required="" value="" name="password" id="password" class="form-control">
<span class="help-block small">Your strong password</span>
</div>
<div class="checkbox">
<!-- <input type="checkbox" class="i-checks" checked>
Remember login
<p class="help-block small">(if this is a private computer)</p> -->
</div>
<button class="btn btn-success btn-block">Login</button>
<!-- <a class="btn btn-default btn-block" href="login.html#">Register</a> -->
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,47 @@
@extends('layouts.login')
@section('page_title')
Airtime Sales | Merchant Login
@endsection
@section('page_content')
<div class="row">
<div class="col-md-12">
<div class="text-center m-b-md">
<h3>Merchant Login</h3>
<!-- <small>This is the best app ever!</small> -->
<div class="text-center w-75 m-auto">
<!-- <p class="text-muted mb-4">Admin Panel Login</p> -->
@if (Session::has('login-error'))
<p class=" text-danger mb-4"> {{ Session::get('login-error') }} </p>
@endif
@include('commons.notifications')
</div>
</div>
<div class="hpanel">
<div class="panel-body">
<form action="{{ url('merchant/login') }}" id="loginForm" method="POST">
{{ csrf_field() }}
<div class="form-group">
<label class="control-label" for="username">Phone Number</label>
<input type="text" placeholder="" title="Please enter you username" required="" value="" name="phone_number" id="username" class="form-control">
<span class="help-block small">Your registered phone number</span>
</div>
<div class="form-group">
<label class="control-label" for="password">Merchant PIN</label>
<input type="password" title="Please enter your PIN" placeholder="******" required="" value="" name="pin" id="password" class="form-control">
<span class="help-block small">Your merchant pin</span>
</div>
<div class="checkbox"></div>
<button class="btn btn-warning btn-block">Login</button>
<p class="text-center" style="padding: 10px;">-- OR --</p>
<!-- <a class="btn btn-warning btn-block" href=""><i class="fa fa-user-plus"></i> Register</a> -->
<a class="btn btn-danger btn-block" href="{{ url('merchant/register') }}">Register</a>
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Airtime Sales | Merchant Login</title>
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css" />
<style>
/* Ensures the phone dropdown takes up the full width of the Bootstrap form-control */
.iti { width: 100%; }
</style>
</head>
<body class="blank">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Homer - Responsive Admin Theme</h1><p>Special Admin Theme for small and medium webapp with very clean and aesthetic style and feel. </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="color-line"></div>
<div class="login-container">
<div class="row">
<div class="col-md-12">
<div class="text-center m-b-md">
<h3>Merchant Login</h3>
<!-- <small>This is the best app ever!</small> -->
<div class="text-center w-75 m-auto">
<!-- <p class="text-muted mb-4">Admin Panel Login</p> -->
@if (Session::has('login-error'))
<p class=" text-danger mb-4"> {{ Session::get('login-error') }} </p>
@endif
@include('commons.notifications')
</div>
</div>
<div class="hpanel">
<div class="panel-body">
<form action="{{ url('merchant/login') }}" id="loginForm" method="POST">
{{ csrf_field() }}
<div class="form-group">
<label class="control-label" for="phone">Phone Number</label>
<input type="tel" id="phone" class="form-control" placeholder="" title="Please enter your phone number" required="">
<input type="hidden" name="phone_number" id="full_phone_number">
<span id="phone-error" class="help-block small text-danger" style="display: none;">Invalid phone number format.</span>
<span class="help-block small text-muted">Your registered phone number</span>
</div>
<div class="form-group">
<label class="control-label" for="password">Merchant PIN</label>
<input type="password" title="Please enter your PIN" placeholder="******" required="" name="pin" id="password" class="form-control">
<span class="help-block small">Your merchant pin</span>
</div>
<div class="checkbox"></div>
<button type="submit" class="btn btn-warning btn-block">Login</button>
<p class="text-center" style="padding: 10px;">-- OR --</p>
<a class="btn btn-danger btn-block" href="{{ url('merchant/register') }}">Register</a>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<strong></strong> {{ date('Y') }} Click Mobile Ltd. <br/>
</div>
</div>
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/intlTelInput.min.js"></script>
<script>
$(document).ready(function() {
var phoneInputField = document.querySelector("#phone");
var errorMsg = $("#phone-error");
var formGroup = $("#phone").closest('.form-group');
var submitBtn = $('#loginForm button[type="submit"]');
// 1. Setup CSRF token for Laravel AJAX POST requests
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('input[name="_token"]').val()
}
});
var phoneInput = window.intlTelInput(phoneInputField, {
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
preferredCountries: ["mw", "zm", "bw"],
separateDialCode: true,
});
// 3. Function to perform the AJAX check
function checkCountrySupport() {
var countryData = phoneInput.getSelectedCountryData();
var isoCode = countryData.iso2.toUpperCase();
// Optional: Change button state to show it's loading
submitBtn.prop('disabled', true).text('Checking...');
$.ajax({
url: "{{ url('/merchant/check-country') }}",
method: 'POST',
data: { iso_code: isoCode },
success: function(response) {
if (response.supported) {
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Login');
} else {
formGroup.addClass('has-error');
errorMsg.text(response.message).show();
submitBtn.text('Login'); // Reset text, but keep disabled
}
},
error: function() {
formGroup.addClass('has-error');
errorMsg.text('Could not verify country. Please try again.').show();
submitBtn.prop('disabled', false).text('Login');
}
});
}
$('#phone').on('keyup', function() {
if (phoneInput.isValidNumber()) {
checkCountrySupport();
} else {
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Login');
}
});
phoneInputField.addEventListener("countrychange", function() {
if ($('#phone').val().trim() !== "" && phoneInput.isValidNumber()) {
checkCountrySupport();
}
});
$('#loginForm').submit(function(e) {
if (!phoneInput.isValidNumber()) {
e.preventDefault();
formGroup.addClass('has-error');
errorMsg.text('Invalid phone number format.').show();
return false;
}
var countryData = phoneInput.getSelectedCountryData();
$('<input>').attr({ type: 'hidden', name: 'country_iso', value: countryData.iso2.toUpperCase() }).appendTo('#loginForm');
$('#full_phone_number').val(phoneInput.getNumber());
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Merchant Sign Up Success</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.success-message {
max-width: 400px;
margin: 100px auto;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
text-align: center;
}
</style>
</head>
<body>
<div class="success-message">
<h2 class="text-success">Sign Up Successful!</h2>
<p>Thank you for signing up. Your account has been created successfully.</p>
<p>You will receive a confirmation SMS after verification.</p>
<a class="btn btn-primary" href="{{ url('/') }}">Home Page</a>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Merchant Sign Up</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.signup-form {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}
</style>
</head>
<body>
<div class="signup-form">
<h2 class="text-center">Merchant Sign Up</h2>
@include('commons.notifications')
<form action="{{ url('merchant/register') }}" id="registerForm" method="POST">
{{ csrf_field() }}
<div class="form-group">
<label for="fullname">Fullname</label>
<input type="text" class="form-control" name="fullname" id="fullname" required>
</div>
<div class="form-group">
<label for="phone">Phone</label>
<input type="text" class="form-control" name="phone" id="phone" required>
</div>
<div class="form-group">
<label for="language">Language</label>
<select class="form-control" id="language" name="language" required>
<option disabled selected>-- Select--</option>
<option value="chichewa">Chichewa</option>
<option value="english">English</option>
</select>
</div>
<button type="submit" class="btn btn-primary btn-block">Sign Up</button>
</form>
<p class="text-center mt-3">Already have an account? <a href="{{ url('merchant/login') }}">Login here</a></p>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
var phoneInputField = document.querySelector("#phone");
var errorMsg = $("#phone-error");
var formGroup = $("#phone").closest('.form-group');
var submitBtn = $('#loginForm button[type="submit"]');
// 1. Setup CSRF token for Laravel AJAX POST requests
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('input[name="_token"]').val()
}
});
// 2. Initialize intl-tel-input
var phoneInput = window.intlTelInput(phoneInputField, {
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
preferredCountries: ["mw", "zm", "bw"],
separateDialCode: true,
});
// 3. Function to perform the AJAX check
function checkCountrySupport() {
var countryData = phoneInput.getSelectedCountryData();
var isoCode = countryData.iso2.toUpperCase();
// Optional: Change button state to show it's loading
submitBtn.prop('disabled', true).text('Checking...');
$.ajax({
url: "{{ url('/merchant/check-country') }}",
method: 'POST',
data: { iso_code: isoCode },
success: function(response) {
if (response.supported) {
// Country is good! Clear errors and enable login button
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Login');
} else {
// Country unsupported. Show the custom message from Laravel
formGroup.addClass('has-error');
errorMsg.text(response.message).show();
submitBtn.text('Login'); // Reset text, but keep disabled
}
},
error: function() {
// Fallback if the server request fails
formGroup.addClass('has-error');
errorMsg.text('Could not verify country. Please try again.').show();
submitBtn.prop('disabled', false).text('Login');
}
});
}
$('#phone').on('keyup', function() {
if (phoneInput.isValidNumber()) {
checkCountrySupport();
} else {
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Login');
}
});
phoneInputField.addEventListener("countrychange", function() {
if ($('#phone').val().trim() !== "" && phoneInput.isValidNumber()) {
checkCountrySupport();
}
});
$('#loginForm').submit(function(e) {
if (!phoneInput.isValidNumber()) {
e.preventDefault();
formGroup.addClass('has-error');
errorMsg.text('Invalid phone number format.').show();
return false;
}
var countryData = phoneInput.getSelectedCountryData();
$('<input>').attr({ type: 'hidden', name: 'country_iso', value: countryData.iso2.toUpperCase() }).appendTo('#loginForm');
$('#full_phone_number').val(phoneInput.getNumber());
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Merchant Sign Up</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css" />
<style>
body {
background-color: #f8f9fa;
}
.signup-form {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}
.iti {
display: block;
width: 100%;
}
</style>
</head>
<body>
<div class="signup-form">
<h2 class="text-center">Merchant Sign Up</h2>
@include('commons.notifications')
<form action="{{ url('merchant/register') }}" id="registerForm" method="POST">
{{ csrf_field() }}
<div class="form-group">
<label for="phone">Phone</label>
<input type="tel" class="form-control" id="phone" required>
<input type="hidden" name="phone" id="full_phone_number">
<span id="phone-error" class="help-block small text-danger" style="display: none;">Invalid phone number format.</span>
</div>
<div class="form-group">
<label for="fullname">Fullname</label>
<input type="text" class="form-control" name="fullname" id="fullname" required>
</div>
<!-- <div class="form-group">
<label for="language">Language</label>
<select class="form-control" id="language" name="language" required>
<option disabled selected>-- Select--</option>
<option value="chichewa">Chichewa</option>
<option value="english">English</option>
</select>
</div> -->
<button type="submit" class="btn btn-primary btn-block">Sign Up</button>
</form>
<p class="text-center mt-3">Already have an account? <a href="{{ url('merchant/login') }}">Login here</a></p>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/intlTelInput.min.js"></script>
<script>
$(document).ready(function() {
var phoneInputField = document.querySelector("#phone");
var errorMsg = $("#phone-error");
var formGroup = $("#phone").closest('.form-group');
var submitBtn = $('#registerForm button[type="submit"]');
// 1. Setup CSRF token for Laravel AJAX
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('input[name="_token"]').val()
}
});
// 2. Initialize intl-tel-input
var phoneInput = window.intlTelInput(phoneInputField, {
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
preferredCountries: ["mw", "zm", "bw"],
separateDialCode: true,
});
// 3. Reusable AJAX check
function checkCountrySupport() {
var countryData = phoneInput.getSelectedCountryData();
var isoCode = countryData.iso2.toUpperCase();
submitBtn.prop('disabled', true).text('Checking...');
$.ajax({
url: "{{ url('/merchant/check-country') }}", // Reusing the endpoint!
method: 'POST',
data: { iso_code: isoCode },
success: function(response) {
if (response.supported) {
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Sign Up');
} else {
formGroup.addClass('has-error');
errorMsg.text(response.message).show();
submitBtn.text('Sign Up'); // Keep disabled to prevent submission
}
},
error: function() {
formGroup.addClass('has-error');
errorMsg.text('Could not verify country. Please try again.').show();
submitBtn.prop('disabled', false).text('Sign Up');
}
});
}
// 4. Listeners for typing and flag changes
$('#phone').on('keyup', function() {
if (phoneInput.isValidNumber()) {
checkCountrySupport();
} else {
formGroup.removeClass('has-error');
errorMsg.hide();
submitBtn.prop('disabled', false).text('Sign Up');
}
});
phoneInputField.addEventListener("countrychange", function() {
if ($('#phone').val().trim() !== "" && phoneInput.isValidNumber()) {
checkCountrySupport();
}
});
// 5. Final Form Submission Intercept
$('#registerForm').submit(function(e) {
if (!phoneInput.isValidNumber()) {
e.preventDefault();
formGroup.addClass('has-error');
errorMsg.text('Invalid phone number format.').show();
return false;
}
// Append country code and formatted number for Laravel
var countryData = phoneInput.getSelectedCountryData();
$('<input>').attr({ type: 'hidden', name: 'country_iso', value: countryData.iso2.toUpperCase() }).appendTo('#registerForm');
$('#full_phone_number').val(phoneInput.getNumber());
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,43 @@
@extends('layouts.login')
@section('page_title')
Airtime Sales | Organisation Login
@endsection
@section('page_content')
<div class="row">
<div class="col-md-12">
<div class="text-center m-b-md">
<h3>Dealer Login</h3>
<!-- <small>This is the best app ever!</small> -->
</div>
<div class="hpanel">
<div class="panel-body">
<div class="text-center w-75 m-auto">
@if (Session::has('login-error'))
<p class=" text-danger mb-4"> {{ Session::get('login-error')}} </p>
@endif
</div>
<form action="{{ url('organisation/login') }}" id="loginForm" method="POST">
{{csrf_field()}}
<div class="form-group">
<label class="control-label" for="username">Email</label>
<input type="text" placeholder="example@gmail.com" title="Please enter you email" required="" value="" name="email" id="email" class="form-control">
<span class="help-block small">Your unique username</span>
</div>
<div class="form-group">
<label class="control-label" for="password">Password</label>
<input type="password" title="Please enter your password" placeholder="*********" required="" value="" name="password" id="password" class="form-control">
<span class="help-block small">Your strong password</span>
</div>
<button class="btn btn-info btn-block">Login</button>
<p class="text-center" style="padding: 10px;">-- OR --</p>
<a class="btn btn-warning btn-block" href="{{ url('dealer/register') }} "><i class="fa fa-user-plus"></i> Register</a>
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dealer Sign Up Success</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.success-message {
max-width: 400px;
margin: 100px auto;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
text-align: center;
}
</style>
</head>
<body>
<div class="success-message">
<h2 class="text-success">Sign Up Successful!</h2>
<p>Thank you for signing up. Your account has been created successfully.</p>
<p>Check your email for a confirmation message after verification.</p>
<a class="btn btn-primary" href="{{ url('/') }}">Home Page</a>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dealer Sign Up</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.signup-form {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}
</style>
</head>
<body>
<div class="signup-form">
<h2 class="text-center">Dealer Sign Up</h2>
@include('commons.notifications')
<form action="{{ url('dealer/register') }}" id="dealderRegisterForm" method="POST">
{{csrf_field()}}
<div class="form-group">
<label for="username">Name</label>
<input type="text" name="name" class="form-control" id="name" required>
</div>
<div class="form-group">
<label for="email">Email address</label>
<input type="email" name="email" class="form-control" id="email" required>
</div>
<div class="form-group">
<label for="email">Phone Number</label>
<input type="text" name="phone" class="form-control" id="phone" required>
</div>
<!-- <div class="form-group">
<label for="password">Password</label>
<input type="password" name="" class="form-control" id="password" required>
</div>
<div class="form-group">
<label for="confirm-password">Confirm Password</label>
<input type="password" name="" class="form-control" id="confirm-password" required>
</div> -->
<button type="submit" class="btn btn-primary btn-block">Submit</button>
</form>
<p class="text-center mt-3">Already have an account? <a href="{{ url('dealer/login') }}">Login here</a></p>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Page title -->
<title>@yield('page_title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
</head>
<body class="blank">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Homer - Responsive Admin Theme</h1><p>Special Admin Theme for small and medium webapp with very clean and aesthetic style and feel. </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="color-line"></div>
<div class="login-container">
@yield('page_content')
<div class="row">
<div class="col-md-12 text-center">
<strong></strong> {{ date('Y') }} Click Mobile Ltd. <br/>
</div>
</div>
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="Description" name="Hassle free Airtime Top Up platform for individuals and organisations" />
<meta content="author" name="Click Mobile Tech Team" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Page title -->
<title>@yield('page-title')</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
<link rel="shortcut icon" href="{{ url('public/assets/images/favicon.ico')}}">
@yield('page-css')
<!-- Vendor styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/fontawesome/css/font-awesome.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/animate.css/animate.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/vendor/bootstrap/dist/css/bootstrap.css') }}" />
<link href="{!! url('public/theme_assets/vendor/select2/dist/css/select2.min.css') !!}" rel="stylesheet">
<!-- App styles -->
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/fonts/pe-icon-7-stroke/css/helper.css') }}" />
<link rel="stylesheet" href="{{ url('public/theme_assets/styles/style.css') }}">
<link href="{!! url('public/css/jquery-confirm.css') !!}" type="text/css" rel="stylesheet">
<script type="text/javascript">
var base_url = "{!! url('/') !!}";
</script>
</head>
<body class="fixed-navbar sidebar-scroll">
<!-- Simple splash screen-->
<div class="splash"> <div class="color-line"></div><div class="splash-title"><h1>Click Mobile </h1><p>Web App with a very clean and aesthetic style and feel. </p><div class="spinner"> <div class="rect1"></div> <div class="rect2"></div> <div class="rect3"></div> <div class="rect4"></div> <div class="rect5"></div> </div> </div> </div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- header -->
@include('merch_layouts.topnav')
@include('merch_layouts.sidebar')
<!-- Main Wrapper -->
<div id="wrapper">
@include('merch_layouts.normalheader')
<div class="content">
@yield('page-content')
<footer class="footer">
<span class="pull-right">{{ date('Y') }} Click Mobile Ltd</span>
</footer>
</div>
<!-- END wrapper -->
</div>
<!-- Vendor scripts -->
<script src="{{ url('public/theme_assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-ui/jquery-ui.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/slimScroll/jquery.slimscroll.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/metisMenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/iCheck/icheck.min.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/select2/dist/js/select2.min.js') }}"></script>
<!-- App scripts -->
<script src="{{ url('public/theme_assets/scripts/homer.js') }}"></script>
<script src="{!! url('public/js/jquery-confirm.js') !!}"></script>
@yield('page-js')
</body>
</html>

View File

@@ -0,0 +1,91 @@
<nav x-data="{ open: false }" class="bg-white border-b border-gray-100">
<!-- Primary Navigation Menu -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('dashboard') }}">
<x-application-logo class="block h-10 w-auto fill-current text-gray-600" />
</a>
</div>
<!-- Navigation Links -->
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
<x-nav-link :href="route('merchant.landing')" :active="request()->routeIs(merchant.landing')">
{{ __('Dashboard') }}
</x-nav-link>
</div>
</div>
<!-- Settings Dropdown -->
<div class="hidden sm:flex sm:items-center sm:ml-6">
<x-dropdown align="right" width="48">
<x-slot name="trigger">
<button class="flex items-center text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out">
<div>user name here</div>
<div class="ml-1">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div>
</button>
</x-slot>
<x-slot name="content">
<!-- Authentication -->
<form method="POST" action="{{ route('merchant.logout') }}">
@csrf
<x-dropdown-link :href="route('merchant.logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-dropdown-link>
</form>
</x-slot>
</x-dropdown>
</div>
<!-- Hamburger -->
<div class="-mr-2 flex items-center sm:hidden">
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
<!-- Responsive Navigation Menu -->
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
<div class="pt-2 pb-3 space-y-1">
<x-responsive-nav-link :href="route('merchant.dashboard')" :active="request()->routeIs('merchant.dashboard')">
{{ __('Dashboard') }}
</x-responsive-nav-link>
</div>
<!-- Responsive Settings Options -->
<div class="pt-4 pb-1 border-t border-gray-200">
<div class="px-4">
<div class="font-medium text-base text-gray-800">Name here</div>
<div class="font-medium text-sm text-gray-500">Phone here</div>
</div>
<div class="mt-3 space-y-1">
<!-- Authentication -->
<form method="POST" action="{{ url('merchant/logout') }}">
@csrf
<x-responsive-nav-link :href="route('merchant.logout')" onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-responsive-nav-link>
</form>
</div>
</div>
</div>
</nav>

View File

@@ -0,0 +1,27 @@
<div class="normalheader small-header">
<div class="hpanel">
<div class="panel-body">
<a class="small-header-action" href="">
<div class="clip-header">
<i class="fa fa-arrow-up"></i>
</div>
</a>
<div id="hbreadcrumb" class="pull-right m-t-lg">
<ol class="hbreadcrumb breadcrumb">
<li><a href="{{ url('merchant') }}">Dashboard</a></li>
<!-- <li>
<span>Tables</span>
</li> -->
<li class="active">
<span>{{ $page_title }}</span>
</li>
</ol>
</div>
<h2 class="font-light m-b-xs">
{{ $page_title }}
</h2>
<!-- <small>Examples of various designs of tables.</small> -->
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
@if ($errors->any())
<ul class="alert alert-danger" style="padding-left:30px;">
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
@endif

View File

@@ -0,0 +1,31 @@
<!-- Navigation -->
<aside id="menu">
<div id="navigation">
<div class="profile-picture">
<a href="{{ url('/') }}">
<!-- <img src="{{ url('public/theme_assets/images/click-airtime-logo.jpg') }}" class="img-circle m-b" alt="logo"> -->
</a>
<div class="stats-label text-color">
<span class="font-extra-bold font-uppercase text-success">{{ session('merchant.fullname') }}</span>
<div id="sparkline1" class="small-chart m-t-sm text-info">{{ session('merchant.phone') }}</div>
</div>
</div>
<ul class="nav" id="side-menu">
<li class="<?php echo ($page_title == 'Merchant Dashboard') ? "active" : ""; ?>">
<a href="{{ url('merchant/landing') }}"> <span class="nav-label">Dashboard</span></a>
</li>
<li class="<?php echo ($page_title == 'Merchant Transactions') ? "active" : ""; ?>">
<a href="{{ url('merchant/transactions') }}"> <span class="nav-label">Transactions</span></a>
</li>
<li class="<?php echo ($page_title == 'Dealers') ? "active" : ""; ?>">
<a href="{{ url('merchant/dealers') }}"> <span class="nav-label">Dealers</span></a>
</li>
<li class="<?php echo ($page_title == 'Dealer Transactions') ? "active" : ""; ?>">
<a href="{{ url('merchant/dealertransactions') }}"> <span class="nav-label">Dealer Top Up</span></a>
</li>
<li class="<?php echo ($page_title == 'Merchant Activity Log') ? "active" : ""; ?>">
<a href="{{ url('merchant/activity') }}"> <span class="nav-label">Activity Logs</span></a>
</li>
</ul>
</div>
</aside>

View File

@@ -0,0 +1,68 @@
<div id="header">
<div class="color-line">
</div>
<div id="logo" class="light-version">
<!-- <span>Airtime Sales</span> -->
<img src="{{ url('public/theme_assets/images/click-airtime-logo-removebg-preview.png') }}" class="" width="80px" alt="logo">
</div>
<nav role="navigation">
<div class="header-link hide-menu"><i class="fa fa-bars"></i></div>
<div class="small-logo">
<span class="text-info">Airtime Sales</span>
</div>
<div class="mobile-menu">
<button type="button" class="navbar-toggle mobile-menu-toggle" data-toggle="collapse" data-target="#mobile-collapse">
<i class="fa fa-chevron-down"></i>
</button>
<div class="collapse mobile-navbar" id="mobile-collapse">
<ul class="nav navbar-nav">
<!-- <li>
<a class="" href="">Login</a>
</li> -->
<li>
<a class="" href="{{ url('merchant/logout') }}">Logout</a>
</li>
<li>
<!-- <a class="" href="">Profile</a> -->
</li>
</ul>
</div>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav no-borders">
<li class="dropdown">
<a class="dropdown-toggle" href="" data-toggle="dropdown">
<i class="pe-7s-keypad"></i>
</a>
<div class="dropdown-menu hdropdown bigmenu animated flipInX">
<table>
<tbody>
<tr>
<td>
<a href="{{ url('merchant/refunds') }}">
<i class="pe pe-7s-cash text-info"></i>
<h5>Merchant Refund</h5>
</a>
</td>
<td>
<a href="{{ url('merchant/change-pin') }}">
<i class="pe pe-7s-shuffle text-info"></i>
<h5>Change PIN</h5>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</li>
<li class="dropdown">
<a href="{{ url('merchant/logout') }}" class="" title="Logout">
<i class="pe-7s-upload pe-rotate-90 text-danger"></i>
</a>
</li>
</ul>
</div>
</nav>
</div>

View File

@@ -0,0 +1,63 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Activity Log
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Activity Log for {{ $merchant->fullname }}</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Title</th>
<th>Details</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($activities as $row)
<tr>
<?php $content = json_decode($row->description, true); //dump($content['data']); ?>
<td>{{ $content['title'] }}</td>
<td>
<?php $flat = \Arr::flatten($content['data']); ?>
{{ implode(' - ', $flat) }}
</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $activities->links() }}
</div>
<div class="panel-footer">
Page : {{ $activities->currentPage() }} of {{ $activities->lastPage() }} |
Total Records : <span id="totalRecords">{{ $activities->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script>
// $(fddd)
console.log('foo bar');
</script>
@endsection

View File

@@ -0,0 +1,124 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Dealer Top Ups
@endsection
@section('page-css')
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Dealer List</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="dealertopups-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="dealertopups-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('merchant/dealertransactions') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="dealerListTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
function statusDesign (cell, formatterParams){
var value = cell.getValue();
// if(value === 'Approved'){
if(value.includes('Success')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Failed')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
var table = new Tabulator("#dealerListTable", {
ajaxURL: "dealerlist/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Dealer",
field: "name",
sorter: "string",
},
{
title: "Dealer Phone",
field: "phone",
sorter: "string",
},
{
title: "Dealer Email",
field: "email",
sorter: "string",
},
{
title: "Status",
field: "status",
sorter: "string",
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#modalHere').modal('show');
},
});
document.getElementById("dealerlist-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "dealerlist.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("dealer-download-pdf").addEventListener("click", function(){
table.download("pdf", "dealer-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Dealer List", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("dealertransactions/all?keyword=" + keyword);
});
</script>
@endsection

View File

@@ -0,0 +1,125 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Dealer Top Ups
@endsection
@section('page-css')
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Top Ups received from Dealers</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="dealertopups-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="dealertopups-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('merchant/dealertransactions') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="dealerTopsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{!! url('public/vendor/tabulator-master/dist/js/tabulator.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
function statusDesign (cell, formatterParams){
var value = cell.getValue();
// if(value === 'Approved'){
if(value.includes('Success')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Failed')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
var table = new Tabulator("#dealerTopsTable", {
ajaxURL: "dealertransactions/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Dealer",
field: "name",
sorter: "string",
},
{
title: "Dealer Phone",
field: "phone",
sorter: "string",
},
{
title: "Amount",
field: "amount",
sorter: "number",
},
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
},
});
document.getElementById("dealertopups-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "dealertopups-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("dealertopups-download-pdf").addEventListener("click", function(){
table.download("pdf", "dealertopups-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Dealer Top Ups", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("dealertransactions/all?keyword=" + keyword);
});
</script>
@endsection

View File

@@ -0,0 +1,328 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Dealer Top Ups
@endsection
@section('page-css')
<link href="{!! url('public/vendor/tabulator-master/dist/css/tabulator_bootstrap3.min.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<!-- <div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Top Ups received from Dealers</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="dealertopups-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="dealertopups-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('merchant/dealertransactions') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="dealerTopsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div> -->
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">
Top Ups received from Dealers
</div>
<div class="panel-body">
<!-- Action Buttons and Search -->
<div class="row" style="margin-bottom:15px;">
<!-- Download Buttons -->
<div class="col-md-6">
<button id="dealertopups-download-xlsx" class="btn btn-success btn-sm">
<i class="fa fa-file-excel-o"></i> Download XLSX
</button>
<button id="dealertopups-download-pdf" class="btn btn-danger btn-sm">
<i class="fa fa-file-pdf-o"></i> Download PDF
</button>
</div>
<!-- Search Box -->
<div class="col-md-6 text-right">
<form method="GET" action="{!! url('merchant/dealertransactions') !!}" class="form-inline">
<div class="input-group" style="width:300px; display:inline-flex;">
<input
type="text"
name="keyword"
id="keywordField"
class="form-control"
placeholder="Search by keyword..."
value="{{ request('keyword') }}">
<span class="input-group-btn">
<button class="btn btn-primary" type="submit">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
</div>
</div>
<!-- Dealer Topups Table -->
<div id="dealerTopsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
@endsection
@section('page-js')
<!-- <script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script> -->
<script src="{!! url('public/vendor/tabulator-master/dist/js/tabulator.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
// Status formatter
function statusDesign(cell) {
const value = cell.getValue() || "";
if (value.includes("Success")) {
return "<span style='color:#3FB449;font-weight:bold'>" + value + "</span>";
}
if (value.includes("Failed")) {
return "<span style='color:#dc3545;font-weight:bold'>" + value + "</span>";
}
return "<span style='color:#E4A11B'>" + value + "</span>";
}
// Initialize Tabulator
var table = new Tabulator("#dealerTopsTable", {
ajaxURL: "dealertransactions/all",
ajaxConfig: "GET",
layout: "fitColumns",
index: "id",
pagination: true,
paginationMode: "remote",
paginationSize: 15,
selectableRows: false,
printAsHtml: true,
ajaxLoader: true,
ajaxLoaderLoading: $("#logo_spinner").html(),
columns: [
{
title: "Dealer",
field: "name",
sorter: "string",
},
{
title: "Dealer Phone",
field: "phone",
sorter: "string",
},
{
title: "Amount",
field: "amount",
sorter: "number",
hozAlign: "right",
},
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
// {
// title: "Action",
// formatter: function (cell) {
// const data = cell.getRow().getData();
// const transaction_id = data.transaction_id;
// return `<button class="btn btn-sm btn-danger" type="button" onclick="refundDealerTopUp('${transaction_id}')" >Refund</button>`;
// },
// hozAlign: "center",
// headerSort: false,
// }
{
title: "Action",
formatter: function (cell) {
const data = cell.getRow().getData();
if (!data.status || !data.status.includes("Success")) return "No Action needed";
const transaction_id = data.transaction_id;
return `<button class="btn btn-sm btn-danger" type="button" onclick="refundDealerTopUp(${transaction_id})">Refund</button>`;
},
hozAlign: "center",
headerSort: false,
}
],
rowClick: function (e, row) {
const data = row.getData();
console.log("Selected ID:", data.id);
// Example:
// window.location = "/dealertransactions/" + data.id;
},
ajaxError: function (xhr, textStatus, errorThrown) {
console.error("Tabulator AJAX Error:", errorThrown);
}
});
// Excel Download
const excelBtn = document.getElementById("dealertopups-download-xlsx");
if (excelBtn) {
excelBtn.addEventListener("click", function () {
table.download("xlsx", "dealertopups-list.xlsx", {
sheetName: "Sheet 1"
});
});
}
// PDF Download
const pdfBtn = document.getElementById("dealertopups-download-pdf");
if (pdfBtn) {
pdfBtn.addEventListener("click", function () {
table.download("pdf", "dealertopups-list.pdf", {
orientation: "portrait",
title: "Click Mobile - Dealer Top Ups"
});
});
}
// Search with debounce
let searchTimer;
$("#keywordField").on("keyup", function () {
clearTimeout(searchTimer);
searchTimer = setTimeout(function () {
table.setData("dealertransactions/all", {
keyword: $("#keywordField").val()
});
}, 300);
});
function refundDealerTopUpOld(transaction_id) {
if (!confirm("Are you sure you want to refund this transaction?")) return;
$.ajax({
url: "/pushrefunds",
method: "POST",
data: { transaction_id: transaction_id },
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content")
},
success: function (res) {
alert(res?.message || "Refund requested successfully.");
table.setData("dealertransactions/all", {
keyword: $("#keywordField").val()
});
},
error: function (xhr) {
console.error(xhr.responseText);
alert("Refund failed: " + (xhr.responseJSON?.message || "Unknown error"));
}
});
}
function refundDealerTopUp(transaction_id) {
$.confirm({
title: 'Refund top up',
content: '' +
'<form id="refundForm">' +
' <div class="form-group">' +
' <label>Reason</label>' +
' <input type="text" class="form-control" name="reason" placeholder="Enter refund reason" required />' +
' </div>' +
'</form>',
type: 'red',
columnClass: 'medium',
buttons: {
cancel: function () {},
confirm: {
text: 'Confirm Refund',
btnClass: 'btn-danger',
action: function () {
const reason = this.$content.find('input[name="reason"]').val();
return $.ajax({
url: "/merchant/pushrefunds",
method: "POST",
data: { transaction_id: transaction_id, reason: reason },
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content")
}
}).done(function (res) {
$.alert(res?.message || "Refund requested successfully.");
table.setData("dealertransactions/all", {
keyword: $("#keywordField").val()
});
}).fail(function (xhr) {
console.log('status:', xhr.status);
console.log(xhr.responseText);
let msg = 'Request failed.';
try {
const res = JSON.parse(xhr.responseText);
if (res && typeof res.message === 'string') msg = res.message;
}
catch (e) {}
$.alert(msg);
});
}
}
}
});
}
</script>
@endsection

View File

@@ -0,0 +1,168 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | {{ $page_title }}
@endsection
@section('page-content')
<div class="row">
<div class="col-lg-12">
<div class="hpanel">
<div class="panel-heading">
Dashboard information and statistics
</div>
<!-- style="height: 150px !important;" -->
<div class="panel-body">
<div class="row">
<div class="col-md-3 text-center">
<div class="small">
<i class="fa fa-bolt"></i> Current Balanace
</div>
<div>
<h1 class="font-extra-bold m-t-xl m-b-xs text-<?php echo ($current_balance > 2000) ? "success" : "danger"; ?> ">
{{ $merchant->currency }} {{ number_format($current_balance) }}
</h1>
<small></small>
</div>
<div class="small m-t-xl">
<!-- <i class="fa fa-clock-o"></i> Data from January -->
</div>
</div>
<div class="col-md-6">
<!-- <div class="text-center small">
<i class="fa fa-laptop"></i> Transactions in current month ({{ date("F") }})
</div>
<div class="flot-chart" style="height: 160px">
<div class="flot-chart-content" id="flot-line-chart"></div>
</div> -->
</div>
<div class="col-md-3 text-center">
<div class="small">
<i class="fa fa-clock-o"></i> Total Sales (Overall)
</div>
<div>
<h1 class="font-extra-bold m-t-xl m-b-xs text-info">
{{ number_format($transaction_sum) }}
</h1>
<!-- <small>And four weeks</small> -->
</div>
<div class="small m-t-xl">
<!-- <i class="fa fa-clock-o"></i> Last active in 12.10.2015 -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="hpanel">
<div class="panel-heading">Customer Top Up</div>
<div class="panel-body">
<form action="{{ url('merchant/topup') }}" method="POST" class="form-horizontal" id="merchantTopForm">
{{csrf_field()}}
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label">Phone Number</label>
<div class="col-md-7">
<input type="number" class="form-control" name="phone_number" placeholder="phone number" required>
<!-- <p class="text-warning" style="padding-top: 10px;">Minimum Amounts - TNM: 1MWK | Airtel : 10MWK </p> -->
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Top Up Amount" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block" type="submit"><i class="fa fa-send"></i> Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="hpanel">
<div class="panel-heading">Recent Transactions</div>
<div class="panel-body">
<div class="table-responsive" style="height:550px; overflow: scroll; ">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr class="bg-info">
<th>Phone</th>
<th>Amount ({{ $merchant->currency }})</th>
<th>Status</th>
<th>Sale Date </th>
</tr>
</thead>
<tbody>
@forelse ($transactions as $row)
<tr>
<td>{{ $row->msisdn }}</td>
<td>{{ number_format($row->amount) }}</td>
<td>{{ $row->status }}</td>
<td>{{ Carbon\Carbon::parse($row->created_at)->format('F d, Y') }}</td>
</tr>
@empty
<tr>
<td colspan="4">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
@endsection
@section('page-js')
<script src="{{ url('public/theme_assets/vendor/jquery-flot/jquery.flot.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-flot/jquery.flot.resize.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery-flot/jquery.flot.pie.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/flot.curvedlines/curvedLines.js') }}"></script>
<script src="{{ url('public/theme_assets/vendor/jquery.flot.spline/index.js') }}"></script>
<script src="{{ url('public/js/merchant_landing.js') }}"></script>
<script>
$(function () {
/**
* Flot charts data and options
*/
/*
var data1 = [ [0, 55], [1, 48], [2, 40], [3, 36], [4, 40], [5, 60], [6, 50], [7, 51] ];
var chartUsersOptions = {
series: {
splines: {
show: true,
tension: 0.4,
lineWidth: 1,
fill: 0.4
},
},
grid: {
tickColor: "#f0f0f0",
borderWidth: 1,
borderColor: 'f0f0f0',
color: '#6a6c6f'
},
colors: [ "#62cb31", "#efefef"],
};
$.plot($("#flot-line-chart"), [data1], chartUsersOptions);
*/
});
</script>
@endsection

View File

@@ -0,0 +1,153 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Refunds
@endsection
@section('page-content')
<div class="row">
<div class="col-md-5">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Dealer Refund 44</div>
<div class="panel-body">
<!-- -->
<form action="{{ url('merchant/pushrefunds') }}" method="POST" class="form-horizontal" id="dealerRefundForm">
{{csrf_field()}}
<input type="hidden" id="merchantId" name="merchant_id" value="{!! $merchant->id !!}">
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label" for="dealerID">Select Dealer</label>
<div class="col-md-7">
<select required class="form-control" name="dealer_id" id="dealerID" placeholder="Merchant" >
<option>-- Select Account --</option>
<?php foreach ($dealers_arr as $row): ?>
<option value="{{ $row->id }}">{{ $row->name }} ({{ $row->phone }}) </option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Refund Amount" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Transaction ID</label>
<div class="col-md-7">
<input type="number" name="transaction_id" class="form-control" id="transactionId" placeholder="Reference Transaction ID" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Reason</label>
<div class="col-md-7">
<input type="text" name="reason" class="form-control" id="reason" placeholder="Brief text as Reason" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block btn-lg" id="refundFormBtn" type="submit"><i class="fa fa-money"></i> Refund Dealer</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Recent Dealer Refunds</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Dealer Name</th>
<th>Dealer Phone</th>
<th>Refund Amount</th>
<th>Transaction ID</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($recent_refunds as $row)
<tr>
<td>{{ $row->orgInfo->name }}</td>
<td>{{ $row->orgInfo->phone }}</td>
<td>{{ $row->amount }}</td>
<td>{{ $row->transaction_id ?? 'N/A' }}</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="4">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $recent_refunds->links() }}
</div>
<div class="panel-footer">
Page : {{ $recent_refunds->currentPage() }} of {{ $recent_refunds->lastPage() }} |
Total Records : <span id="totalRecords">{{ $recent_refunds->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script>
$(document).ready(function(){
console.log('foo');
$('#dealerID').select2({
// tags : true
});
$('#dealerRefundFormZZZ').on('submit', function(evt) {
evt.preventDefault();
$('#successArea').addClass('hidden');
$('#errorArea').addClass('hidden');
var merchID = $('#merchantId').val();
var dealerID = $('#dealerID').val();
$.ajax({
type: 'POST',
url: base_url + '/merchant/lukers',
// data: formdata, //a $(this).serialize(),
data: { merchant_id: merchID, dealer_id: dealerID, amount: $('#amount').val(), reason : $('#reason').val() },
headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content") },
success: function(response) {
console.log(response);
if (response.status == 'failed') {
$('#errorArea').removeClass('hidden');
$('#errorArea').html(response.message);
}
else{
$('#successArea').removeClass('hidden');
$('#successArea').html(response.message);
setTimeout(function() {
location.reload();
}, 3000);
}
},
error: function(xhr, status, error) {
$('#errorArea').removeClass('hidden');
// $('#errorArea').html(response.message);
xhr.responseJSON.errors.forEach(function(value, index) {
console.log(index + ': ' + value);
$('#errorArea').html(index + ': ' + value);
});
}
});
});
});
</script>
@endsection

View File

@@ -0,0 +1,153 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Refunds
@endsection
@section('page-content')
<div class="row">
<div class="col-md-5">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Dealer Refund 44</div>
<div class="panel-body">
<!-- -->
<form action="{{ url('merchant/pushrefunds') }}" method="POST" class="form-horizontal" id="dealerRefundForm">
{{csrf_field()}}
<input type="hidden" id="merchantId" name="merchant_id" value="{!! $merchant->id !!}">
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label" for="dealerID">Select Dealer</label>
<div class="col-md-7">
<select required class="form-control" name="dealer_id" id="dealerID" placeholder="Merchant" >
<option>-- Select Account --</option>
<?php foreach ($dealers_arr as $row): ?>
<option value="{{ $row->id }}">{{ $row->name }} ({{ $row->phone }}) </option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Refund Amount" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Transaction ID</label>
<div class="col-md-7">
<input type="number" name="transaction_id" class="form-control" id="transactionId" placeholder="Reference Transaction ID" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Reason</label>
<div class="col-md-7">
<input type="text" name="reason" class="form-control" id="reason" placeholder="Brief text as Reason" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block btn-lg" id="refundFormBtn" type="submit"><i class="fa fa-money"></i> Refund Dealer</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Recent Dealer Refunds</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Dealer Name</th>
<th>Dealer Phone</th>
<th>Refund Amount</th>
<th>Transaction ID</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($recent_refunds as $row)
<tr>
<td>{{ $row->orgInfo->name }}</td>
<td>{{ $row->orgInfo->phone }}</td>
<td>{{ $row->amount }}</td>
<td>{{ $row->transaction_id or 'N/A' }}</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="4">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $recent_refunds->links() }}
</div>
<div class="panel-footer">
Page : {{ $recent_refunds->currentPage() }} of {{ $recent_refunds->lastPage() }} |
Total Records : <span id="totalRecords">{{ $recent_refunds->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script>
$(document).ready(function(){
console.log('foo');
$('#dealerID').select2({
// tags : true
});
$('#dealerRefundFormZZZ').on('submit', function(evt) {
evt.preventDefault();
$('#successArea').addClass('hidden');
$('#errorArea').addClass('hidden');
var merchID = $('#merchantId').val();
var dealerID = $('#dealerID').val();
$.ajax({
type: 'POST',
url: base_url + '/merchant/lukers',
// data: formdata, //a $(this).serialize(),
data: { merchant_id: merchID, dealer_id: dealerID, amount: $('#amount').val(), reason : $('#reason').val() },
headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content") },
success: function(response) {
console.log(response);
if (response.status == 'failed') {
$('#errorArea').removeClass('hidden');
$('#errorArea').html(response.message);
}
else{
$('#successArea').removeClass('hidden');
$('#successArea').html(response.message);
setTimeout(function() {
location.reload();
}, 3000);
}
},
error: function(xhr, status, error) {
$('#errorArea').removeClass('hidden');
// $('#errorArea').html(response.message);
xhr.responseJSON.errors.forEach(function(value, index) {
console.log(index + ': ' + value);
$('#errorArea').html(index + ': ' + value);
});
}
});
});
});
</script>
@endsection

View File

@@ -0,0 +1,143 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Refunds
@endsection
@section('page-js')
@endsection
@section('page-content')
<div class="row">
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Dealer Refund</div>
<div class="panel-body">
<!-- -->
<form action="{{ route('pushrefunds') }}" method="POST" class="form-horizontal" id="dealerRefundForm">
{{csrf_field()}}
<input type="hidden" id="merchantId" name="merchant_id" value="{!! $merchant->id !!}">
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label">Select Dealer</label>
<div class="col-md-7">
<select required class="form-control" name="dealer_id" id="dealerID" placeholder="Merchant" >
<option>-- Select Account --</option>
<?php foreach ($dealers_arr as $row): ?>
<option value="{{ $row->id }}">{{ $row->name }} ({{ $row->phone }}) </option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Refund Amount" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Reason</label>
<div class="col-md-7">
<input type="text" name="reason" class="form-control" id="reason" placeholder="Brief text as Reason" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block btn-lg" id="refundFormBtn" type="submit"><i class="fa fa-money"></i> Top Up Merchant</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Recent Dealer Refunds</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Dealer Name</th>
<th>Dealer Phone</th>
<th>Refund Amount</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($recent_refunds as $row)
<tr>
<td>{{ $row->orgUserInfo->name }}</td>
<td>{{ $row->orgUserInfo->phone }}</td>
<td>{{ $row->amount }}</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="4">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $recent_refunds->links() }}
</div>
<div class="panel-footer">
Page : {{ $recent_refunds->currentPage() }} of {{ $recent_refunds->lastPage() }} |
Total Records : <span id="totalRecords">{{ $recent_refunds->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script>
$(document).ready(function(){
console.log('foo');
alert('foo');
$('#dealerID').select2({
// tags : true
});
$('#dealerRefundFormZZZ').on('submit', function(evt) {
evt.preventDefault();
$('#successArea').addClass('hidden');
$('#errorArea').addClass('hidden');
var merchID = $('#merchantId').val();
var dealerID = $('#dealerID').val();
$.ajax({
type: 'POST',
url: base_url + '/merchant/lukers',
// data: formdata, //a $(this).serialize(),
data: { merchant_id: merchID, dealer_id: dealerID, amount: $('#amount').val(), reason : $('#reason').val() },
headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content") },
success: function(response) {
console.log(response);
if (response.status == 'failed') {
$('#errorArea').removeClass('hidden');
$('#errorArea').html(response.message);
}
else{
$('#successArea').removeClass('hidden');
$('#successArea').html(response.message);
setTimeout(function() {
location.reload();
}, 3000);
}
},
error: function(xhr, status, error) {
$('#errorArea').removeClass('hidden');
// $('#errorArea').html(response.message);
xhr.responseJSON.errors.forEach(function(value, index) {
console.log(index + ': ' + value);
$('#errorArea').html(index + ': ' + value);
});
}
});
});
});
</script>
@endsection

View File

View File

@@ -0,0 +1,53 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Refunds
@endsection
@section('page-content')
<div class="row">
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Dealer Refund</div>
<div class="panel-body">
<!-- -->
<form action="{{ url('merchant/change-pin') }}" method="POST" class="form-horizontal" id="changePinForm">
{{ csrf_field() }}
<input type="hidden" name="merchant_id" value="{{ $merchant->id }}">
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label">Current PIN</label>
<div class="col-md-7">
<input type="password" class="form-control" name="current_pin" placeholder="Current PIN" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">New PIN</label>
<div class="col-md-7">
<input type="password" class="form-control" name="new_pin" placeholder="New PIN" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12">
<button class="btn btn-warning btn-block" type="submit"><i class="fa fa-save"></i> Change PIN</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{{ url('public/js/merchant_landing.js') }}"></script>
<script>
</script>
@endsection

View File

@@ -0,0 +1,56 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Transactions
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Sales from <strong><span class="text-success">{{ $merchant->fullname }}</span></strong> to Customers</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Recipient Phone</th>
<th>Amount</th>
<th>Status</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($transactions as $row)
<tr>
<td>{{ $row->msisdn }}</td>
<td>{{ number_format($row->amount) }}</td>
<td>{{ $row->status }}</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="4">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $transactions->links() }}
</div>
<div class="panel-footer">
Page : {{ $transactions->currentPage() }} of {{ $transactions->lastPage() }} |
Total Records : <span id="totalRecords">{{ $transactions->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
@endsection

View File

@@ -0,0 +1,134 @@
@extends('merch_layouts.merch_master')
@section('page-title')
Merchant | Transactions
@endsection
@section('page-css')
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Sales from <strong><span class="text-success">{{ $merchant->fullname }}</span></strong> to Customers</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="transactions-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="transactions-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('merchant/transactions') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="transactionsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
function statusDesign (cell, formatterParams){
var value = cell.getValue();
// if(value === 'Approved'){
if(value.includes('Success')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Failed')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
var table = new Tabulator("#transactionsTable", {
ajaxURL: "transactions/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
// {
// title: "Merchant",
// field: "fullname",
// sorter: "string",
// },
{
title: "Merchant Phone",
field: "msisdn",
sorter: "string",
// formatter: cellDesign,
// formatter:link,
},
{
title: "Amount",
field: "amount",
sorter: "number",
},
// {
// title: "Payment Method",
// field: "payment_method",
// sorter: "string",
// },
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#modalHere').modal('show');
},
});
document.getElementById("transactions-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "transactions-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("transactions-download-pdf").addEventListener("click", function(){
table.download("pdf", "transactions-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Sender ID", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("transactions/all?keyword=" + keyword);
});
</script>
@endsection

View File

@@ -0,0 +1,60 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Activity Log
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Activity Log for </div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Title</th>
<th>Details</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($activities as $row)
<tr>
<?php $content = json_decode($row->description, true); //dump($content['data']); ?>
<td>
{{ $content['title'] }}
</td>
<td>
<?php $data_all = is_array($content['data']) ? implode(" | ", $content['data']) : $content['data']; ?>
{{ $data_all }}
</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $activities->links() }}
</div>
<div class="panel-footer">
Page : {{ $activities->currentPage() }} of {{ $activities->lastPage() }} |
Total Records : <span id="totalRecords">{{ $activities->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
@endsection

View File

@@ -0,0 +1,140 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | {{ $page_title }}
@endsection
@section('page-content')
<div class="row">
<!-- Top Statistics Panel -->
<div class="col-lg-12">
<div class="hpanel">
<div class="panel-heading">
Dashboard information and statistics
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3 text-center">
<div class="small">
<i class="fa fa-bolt"></i> Current Balance
</div>
<div>
<h1 class="font-extra-bold m-t-xl m-b-xs text-info">
{{ $organisation->currency ?? "" }} {{ number_format(($organisation->balance ?? 0) ?: 0, 2) }}
</h1>
</div>
</div>
<div class="col-md-6">
<!-- Space for future charts or metrics -->
</div>
<div class="col-md-3 text-center">
<div class="small">
<i class="fa fa-money"></i> Total Sales (Overall)
</div>
<div>
<h1 class="font-extra-bold m-t-xl m-b-xs text-info">
{{ $organisation->currency ?? "" }} {{ number_format($merchant_topups->sum('amount'), 2) }}
</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Merchant Top Up Form -->
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Merchant Top Up</div>
<div class="panel-body">
<form action="{{ route('dealer.topup') }}" method="POST" class="form-horizontal" id="dealerTopForm">
@csrf
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label">Select Merchant</label>
<div class="col-md-7">
<select required class="form-control" name="merchant" id="merchant">
<option value="">-- Select Account --</option>
@foreach ($merchants as $row)
<option value="{{ $row->id }}">{{ $row->fullname ?? "" }} ({{ $row->phone }})</option>
@endforeach
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Top Up Amount" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12">
<button class="btn btn-info btn-block btn-lg" id="topFormBtn" type="submit">
<i class="fa fa-money"></i> Top Up Merchant
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Recent Transactions Table -->
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Recent Transactions</div>
<div class="panel-body">
<div class="table-responsive" style="height: 250px; overflow-y: auto;">
<table class="table table-bordered table-striped">
<thead>
<tr class="bg-info">
<th>Recipient Merchant</th>
<th>Amount ({{ $organisation->currency ?? "" }})</th>
<th>Payment Method</th>
<th>Status</th>
<th>Sale Date</th>
</tr>
</thead>
<tbody>
@forelse ($merchant_topups as $row)
<tr>
<td>{{ optional($row->merchantInfo)->fullname ?? 'N/A' }}</td>
<td>{{ number_format($row->amount, 2) }}</td>
<td>{{ $row->payment_method }}</td>
<td>{{ $row->status }}</td>
<td>{{ \Carbon\Carbon::parse($row->created_at)->format('F d, Y') }}</td>
</tr>
@empty
<tr>
<td colspan="5" class="text-center">No Data Available</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{{ asset('public/js/dealer_landing.js') }}"></script>
<script>
$(function () {
// Custom page scripts can go here
});
</script>
@endsection

View File

@@ -0,0 +1,63 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Organisation | {{ $page_title }}
@endsection
@section('page-css')
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
@include('commons.notifications')
</div>
<div class="col-md-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Merchant Account</div>
<div class="panel-body">
<form action="{{ route('merchant.update', $merchant->id) }}" id="editMerchantForm" method="POST" class="form-horizontal">
{{ csrf_field() }}
@method('PUT')
<div class="form-group">
<label class="col-sm-2 control-label">Fullname</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="fullname" value="{{ $merchant->fullname }}" placeholder="Full Name of Merchant " required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Phone</label>
<div class="col-sm-10">
<input type="text" name="phone" value="{{ $merchant->phone }}" class="form-control" id="merchantPhone" placeholder="Phone number " required >
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Language</label>
<div class="col-sm-10">
<select class="form-control" name="language" id="merchantLanguage">
<option value="">-- Select Language --</option>
<option value="english" <?php echo ($merchant->language == 'english') ? "selected" : ""; ?> >English</option>
<option value="chichewa" <?php echo ($merchant->language == 'chichewa') ? "selected" : ""; ?>>Chichewa</option>
</select>
</div>
</div>
<div class="form-group"><label class="col-sm-2 control-label">Status</label>
<div class="col-sm-10">
<select class="form-control" name="status" id="merchantStatus">
<option value="">-- Select Status --</option>
<option value="active" <?php echo ($merchant->status == 'active') ? "selected" : ""; ?> >Active</option>
<option value="inactive" <?php echo ($merchant->status == 'inactive') ? "selected" : ""; ?>>Inactive</option>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-success btn-block" type="submit"> <i class="fa fa-save"></i> Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,143 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Transactions
@endsection
@section('page-content')
@include('organisation.partials.top_up_merchant')
@include('organisation.partials.top_up_merchant_by_id')
<div class="row">
<div class="col-lg-3">
<div class="hpanel stats hblue">
<div class="panel-heading hbuilt">Merchant Details</div>
<div class="panel-body list">
<div class="stats-title pull-left">
<!-- <h4>Details</h4> -->
</div>
<!-- <div class="stats-icon pull-right text-warning">
<i class="pe-7s-science fa-4x"></i>
</div> -->
<div class="row m-t-md">
<div class="col-lg-12">
<div class="text-center bg-success p-xs">
<span class="font-extra-bold no-margins text-center">
<u>{{ strtoupper($merchant->fullname) }}</u>
</span>
<br/>
</div>
</div>
</div>
<div class="row m-t-md">
<div class="col-lg-6">
<h4 class="no-margins font-bold text-success">{{ $merchant->phone }}</h4>
<div class="font-bold">Phone <i class="fa fa-phone text-success"></i></div>
</div>
<div class="col-lg-6">
<h4 class="no-margins font-bold text-success">{{ ucfirst($merchant->language) }}</h4>
<div class="font-bold">Language</div>
</div>
</div>
<div class="row m-t-md">
<div class="col-lg-6">
<h3 class="no-margins font-bold text-info ">{{ number_format($merchant->balance, 2) }}</h3>
<div class="font-bold">Balance <i class="fa fa-money"></i></div>
</div>
<div class="col-lg-6">
<h3 class="no-margins font-bold text-info">{{ ucfirst($merchant->status) }}</h3>
<div class="font-bold">Status <i class=""></i></div>
</div>
</div>
<div class="row m-t-md">
<div class="col-md-12">
<button class="btn btn-block btn-success topUpMerchantByIdBtn" id=""><i class="fa fa-money"></i> Top Up Balance</button>
<input type="hidden" class="hidden rowMerchantId" value="{{ $merchant->id }}" />
</div>
</div>
<div class="row m-t-md">
<div class="col-md-12">
<!-- <button class="btn btn-block btn-info"><i class="fa fa-edit"></i> Edit Merchant</button> -->
<a href="{{ route('merchant.edit', $merchant->id) }}" class="btn btn-info btn-block"><i class="fa fa-edit"></i> Edit Details</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">
Merchant Sales to Customers
</div>
<div class="panel-body list">
<div class="table-responsive project-list">
<table class="table table-striped">
<thead>
<tr class="bg-info">
<th>Recipient Phone</th>
<th>Amount (MWK)</th>
<th>Status</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
@forelse ($merchant->transactions as $row)
<td>{{ $row->msisdn }}
<!-- <br/>
<small><i class="fa fa-money"></i> {{ $row->amount }} </small> -->
</td>
<td>
<span class="pie">{{ number_format($row->amount) }}</span>
</td>
<td><strong>{{ $row->status }}</strong></td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="7">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">
Merchant Balance Top Ups
</div>
<div class="panel-body list">
<!-- <div class="panel-title">Last Activity</div> -->
<!-- <small class="fo">This is simple example</small> -->
<div class="list-item-container">
@forelse ($merchant_topups as $row)
<div class="list-item">
<h3 class="no-margins font-extra-bold text-success">MWK {{ number_format($row->amount) }}</h3>
<small>{{ $row->status }}</small> <br>
<div class="pull-right font-bold">{{ $row->created_at }} <i class="fa fa-calendar text-success"></i></div>
</div>
@empty
<tr>
<td colspan="7">No Data</td>
</tr>
@endforelse
</div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{{ url('public/js/dealer_landing.js') }}"></script>
@endsection

View File

@@ -0,0 +1,82 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Merchants
@endsection
@section('page-content')
@include('organisation.partials.create_merchant')
@include('organisation.partials.top_up_merchant_by_id')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt text-info">
Sales to Merchants
<buton class="btn btn-success btn-xs mb-2 pull-right" id="addNewMerchant"><i class="fa fa-plus"></i> Add Merchant</button>
<input type="hidden" class="orgRowId" value="{{ $org_user['org_id'] }}">
<div class="clearfix"></div>
</div>
<div class="panel-body">
<div>
@include('commons.notifications')
<div class="clearfix"></div>
</div>
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr class="bg-info">
<th>Name</th>
<th>Phone</th>
<th>Language</th>
<th>Balance</th>
<th>Status</th>
<th>Registration Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($merchants as $row)
<tr>
<td>{{ $row->fullname }}</td>
<td>{{ $row->phone }}</td>
<td>{{ ucfirst($row->language) }}</td>
<td>{{ number_format($row->balance) }}</td>
<td class="<?php echo ($row->status == 'inactive') ? 'bg-warning' : 'bg-success'; ?>">{{ ucfirst($row->status) }}</td>
<td>{{ $row->created_at }}</td>
<td>
<input type="hidden" class="orgRowId" value="{{ $row->id }}">
<button type="button" class="btn btn-success btn-xs topUpMerchantBtn" ><i class="fa fa-plus"></i> Top Up</button>
<a href="{{ route('merchant.show', $row->id) }}" class="btn btn-primary btn-xs"><i class="fa fa-eye"></i> View</a>
<a href="{{ route('merchant.edit', $row->id) }}" class="btn btn-info btn-xs"><i class="fa fa-edit"></i> Edit</a>
<!-- <a href="{{ route('merchant.destroy', $row->id) }}" class="btn btn-danger btn-xs" onclick="return confirm('Are you sure you want to delete this merchant?')"><i class="fa fa-ban"></i> Disable</a> -->
</td>
</tr>
@empty
<tr>
<td colspan="7">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $merchants->links() }}
</div>
<div class="panel-footer">
Page : {{ $merchants->currentPage() }} of {{ $merchants->lastPage() }} |
Total Records : <span id="totalRecords">{{ $merchants->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{{ url('public/js/dealer_landing.js') }}"></script>
<script>
$(document).ready(function() {
});
</script>
@endsection

View File

@@ -0,0 +1,128 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Transactions
@endsection
@section('page-css')
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Purchases from Super Venders</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="transactions-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="transactions-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('organisation/mytopups') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="transactionsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
function statusDesign (cell, formatterParams){
var value = cell.getValue();
// if(value === 'Approved'){
if(value.includes('Success')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Failed')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
var table = new Tabulator("#transactionsTable", {
ajaxURL: "mytopups/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Vendor Name",
field: "name",
sorter: "string",
// formatter: cellDesign,
// formatter:link,
},
{
title: "Amount",
field: "amount",
sorter: "number",
},
{
title: "Payment Method",
field: "payment_method",
sorter: "string",
},
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#modalHere').modal('show');
},
});
document.getElementById("transactions-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "transactions-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("transactions-download-pdf").addEventListener("click", function(){
table.download("pdf", "transactions-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Sender ID", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("mytopups/all?keyword=" + keyword);
});
</script>
@endsection

View File

@@ -0,0 +1,50 @@
<div class="modal fade" id="createMerchantModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="color-line"></div>
<div class="modal-header">
<h4 class="modal-title titleHead" ></h4>
<small class="font-bold">Merchant Registration</small>
</div>
<div class="modal-body">
<div class="alert alert-danger hidden" id="topupError"></div>
<div class="alert alert-success hidden" id="topupSuccess"></div>
<!-- {{ url('organisation/merchant') }} -->
<form action="" id="newMerchantForm" method="POST" class="form-horizontal">
{{ csrf_field() }}
<div class="form-group">
<label class="col-sm-2 control-label">Fullname</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="fullname" placeholder="Full Name of Merchant " required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Phone</label>
<div class="col-sm-10">
<input type="text" name="phone_number" class="form-control" id="merchantPhone" placeholder="Phone number " required >
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Language</label>
<div class="col-sm-10">
<select class="form-control" name="language" id="merchantLanguage">
<option value="">-- Select Language --</option>
<option value="english">English</option>
<option value="chichewa">Chichewa</option>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-primary btn-block" type="submit">Submit</button>
<button class="btn btn-default btn-block" type="button">Cancel</button> <br>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,59 @@
<div class="modal fade" id="topUpMerchantModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="color-line"></div>
<div class="modal-header">
<h4 class="modal-title titleHead" ></h4>
<small class="font-bold">Merchant Top Up</small>
</div>
<div class="modal-body">
<div class="alert alert-danger hidden" id="topupError"></div>
<div class="alert alert-success hidden" id="topupSuccess"></div>
<form action="{{ url('organisation/topup') }}" method="POST" class="form-horizontal" id="dealerTopForm">
{{csrf_field()}}
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="form-group">
<label class="col-md-3 control-label">Select Merchant</label>
<div class="col-md-7">
<!-- <input type="text" class="form-control" name="phone_number" placeholder="phone number" required> -->
<select required class="form-control" name="merchant" id="merchant" placeholder="Merchant" >
<option>-- Select Account --</option>
<?php foreach ($merchants_list as $row): ?>
<option value="{{ $row->id }}">{{ $row->fullname }} ({{ $row->phone }}) </option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label">Amount (MWK)</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="amount" placeholder="Top Up Amount" required>
</div>
</div>
<div class="form-group hidden" id="otpDivArea">
<label class="col-md-3 control-label">OTP</label>
<div class="col-md-7">
<input type="number" name="otp" class="form-control" id="otp" placeholder="One Time Password(OTP)" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-success btn-block btn-lg" id="otpButton" type="submit"><i class="fa fa-send"></i> Submit</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block btn-lg hidden" id="topFormBtn" type="submit"><i class="fa fa-money"></i> Top Up Merchant</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,49 @@
<div class="modal fade" id="topUpMerchantByIdModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="color-line"></div>
<div class="modal-header">
<h4 class="modal-title titleHead" ></h4>
<small class="font-bold">Merchant Top Up</small>
</div>
<div class="modal-body">
<div class="col-md-12" style="padding-bottom: 10px;">
@include('commons.notifications')
</div>
<div class="alert alert-danger hidden" id="topupByIdError"></div>
<div class="alert alert-success hidden" id="topupByIdSuccess"></div>
<!-- {{ url('organisation/topup') }} -->
<form action="" method="POST" class="form-horizontal" id="dealerTopFormById">
<input type="hidden" name="merchant_id" class="selectedMerchantId" value="">
<input type="hidden" name="merchant" class="selectedMerchantId" value="">
{{ csrf_field() }}
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-md-3 control-label" for="topUpAmountById">Amount (MWK)</label>
<div class="col-md-7">
<input type="number" name="amount" class="form-control" id="topUpAmountById" placeholder="Top Up Amount" required>
</div>
</div>
<!-- <div class="form-group hidden" id="otpDivArea">
<label class="col-md-3 control-label">OTP</label>
<div class="col-md-7">
<input type="number" name="otp" class="form-control" id="otp" placeholder="One Time Password(OTP)" required>
</div>
</div> -->
<div class="hr-line-dashed"></div>
<!-- <div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-success btn-block btn-lg" id="otpButton" type="submit"><i class="fa fa-send"></i> Submit</button>
</div>
</div> -->
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-info btn-block btn-lg" id="topFormByIdBtn" type="submit"><i class="fa fa-money"></i> Top Up Merchant</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,57 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Transactions
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Sales from {{ $org_user['name'] }} to Merchants</div>
<div class="panel-body">
<div class="table-responsive">
<table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
<thead>
<tr class="bg-info">
<th>Recipient Merchant</th>
<th>Amount</th>
<th>Payment Method</th>
<th>Status</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@forelse ($merchant_topups as $row)
<tr>
<td>{{ $row->merchantInfo->fullname }}</td>
<td>{{ number_format($row->amount) }}</td>
<td>{{ $row->payment_method }}</td>
<td>{{ $row->status }}</td>
<td>{{ $row->created_at }}</td>
</tr>
@empty
<tr>
<td colspan="">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $merchant_topups->links() }}
</div>
<div class="panel-footer">
Page : {{ $merchant_topups->currentPage() }} of {{ $merchant_topups->lastPage() }} |
Total Records : <span id="totalRecords">{{ $merchant_topups->total() }}</span>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
@endsection

View File

@@ -0,0 +1,135 @@
@extends('dealer_layouts.dealer_master')
@section('page-title')
Dealer | Transactions
@endsection
@section('page-css')
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel hblue">
<div class="panel-heading hbuilt">Sales from <span class="text-success"><b>{{ strtoupper($org_user['name']) }}</b> </span>to Merchants</div>
<div class="panel-body">
<div class="" style="padding-bottom: 10px;">
<button id="transactions-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="transactions-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('organisation/transactions') !!}">
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
</div>
</div>
</form>
</div>
<div id="transactionsTable"></div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
@endsection
@section('page-js')
<script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
function statusDesign (cell, formatterParams){
var value = cell.getValue();
// if(value === 'Approved'){
if(value.includes('Success')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Failed')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
var table = new Tabulator("#transactionsTable", {
ajaxURL: "transactions/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Merchant",
field: "fullname",
sorter: "string",
// formatter: cellDesign,
// formatter:link,
},
{
title: "Merchant Phone",
field: "phone",
sorter: "string",
// formatter: cellDesign,
// formatter:link,
},
{
title: "Amount",
field: "amount",
sorter: "number",
},
{
title: "Payment Method",
field: "payment_method",
sorter: "string",
},
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Date",
field: "created_at",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#modalHere').modal('show');
},
});
document.getElementById("transactions-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "transactions-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("transactions-download-pdf").addEventListener("click", function(){
table.download("pdf", "transactions-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Sender ID", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("transactions/all?keyword=" + keyword);
});
</script>
@endsection

View File

@@ -0,0 +1,147 @@
@extends('layouts.admin_master')
@section('page-title')
Admin | Dashboard
@endsection
@section('page-css')
<link href="{!! url('public/vendor/tabulator-master/dist/css/tabulator_bootstrap3.min.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
<div class="hpanel">
<div class="panel-heading">Sales from Super Admin to Dealers</div>
<div class="panel-body">
<div class="" id="adminTransactions"></div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
<!-- <script type="text/javascript" src="https://unpkg.com/tabulator-tables@6.4.0/dist/js/tabulator.min.js"></script> -->
<script type="text/javascript" src="{!! url('public/vendor/tabulator-master/dist/js/tabulator.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/vendor/tabulator-master/dist/js/xlsx.full.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/vendor/tabulator-master/dist/js/jspdf.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/vendor/tabulator-master/dist/js/jspdf.plugin.autotable.js') !!}"></script>
<script>
$(document).ready(function(){
function link(cell, formatterParams){
var url = cell.getValue();
var rowID = cell.getData().id
return "<a href='"+ base_url + "/senderids/"+rowID+"/edit' class='btn btn-link'>"+url+"</a>";
}
function cellDesign (cell, formatterParams){
var value = cell.getValue();
return "<span style='color:#54B4D3; font-weight:bold;'>" + value + "</span>";
}
function statusDesign (cell, formatterParams){
var value = cell.getValue();
if (value !== null) {
if(value.includes('Approved')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else if(value.includes('Active')){
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
}
else{
return "<span style='color:#E4A11B;'>" + value + "</span>";
}
}
}
var table = new Tabulator("#adminTransactions", {
ajaxURL: "admin-dealer-transactions",
paginationSize: 15,
layout: "fitColumns",
// --- FIX 1: Correct Pagination Syntax ---
pagination: true,
paginationMode: "remote",
// ----------------------------------------
filterMode: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
ajaxResponse: function(url, params, response) {
if (response.data) {
return {
"data": response.data,
"last_page": response.last_page
};
}
return response;
},
columns: [
{
title: "Dealer Name",
field: "dealer_name",
sorter: "string",
headerFilter:"input",
},
{
title: "Top Up Amount",
field: "amount",
formatter: "money",
formatterParams: {
decimal: ".", // Decimal separator
thousand: ",", // Thousands separator
// symbol: "$", // Currency symbol
symbolAfter: false, // Position symbol before number
precision: 2, // Number of decimal places
},
sorter: "string",
headerFilter:"input"
},
{
title: "Balance Before",
field: "current_balance",
formatter: "money",
sorter: "string",
headerFilter:"input",
},
{
title: "Current Balance",
field: "balance",
formatter: "money",
sorter: "string",
headerFilter:"input",
},
{
title: "Admin Name",
field: "admin_name",
sorter: "string",
headerFilter:"input",
},
{
title: "Status",
field: "status",
sorter: "string",
headerFilter:"input",
formatter: statusDesign,
},
{
title: "Date & Time",
field: "created_at",
sorter: "string",
headerFilter:"input",
},
],
});
$('#keywordField').on('keyup', function(){
var keyword = $(this).val();
table.setData("admin-dealer-transactions?keyword=" + keyword);
});
});
</script>
@endsection

View File

@@ -0,0 +1,79 @@
@extends('layouts.admin_master')
@section('page-title')
Admin | {{ $page_title }}
@endsection
@section('page-css')
@endsection
@section('page-content')
<div class="row">
<form action="{{ url('admin/organisation/store') }}" method="POST" >
{{csrf_field()}}
<div class="col-md-12">
@include('commons.notifications')
</div>
<div class="col-md-6">
<div class="hpanel">
<div class="panel-heading">Main Organisation</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">Fullname</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="name" placeholder="Full Name of Organisation (Dealer) " required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="email" class="form-control" id="email" placeholder="Organisation's Email" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Phone</label>
<div class="col-sm-10">
<input type="text" name="phone" class="form-control" id="phone" placeholder="Organisation's Phone " required >
</div>
</div>
<div class="hr-line-dashed"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="hpanel">
<div class="panel-heading">Organisation User Account</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="user_name" placeholder="Full Name" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="user_email" class="form-control" id="userEmail" placeholder="Enter User Email" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group"><label class="col-sm-2 control-label">Phone</label>
<div class="col-sm-10">
<input type="text" name="user_phone" class="form-control" id="userPhone" placeholder="Enter User Phone number " required >
</div>
</div>
<div class="hr-line-dashed"></div>
</div>
</div>
</div>
<div class="com-md-12">
<div class="form-group">
<div class="col-sm-12 ">
<button class="btn btn-primary btn-block" type="submit">Submit</button>
<button class="btn btn-default btn-block" type="button">Cancel</button> <br>
</div>
</div>
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,153 @@
@extends('layouts.admin_master')
@section('page-title')
Admin | {{ $page_title }}
@endsection
@section('page-css')
@endsection
@section('page-content')
<div class="row">
<form action="{{ url('admin/organisation/store') }}" method="POST">
{{ csrf_field() }}
<div class="col-md-12">
@include('commons.notifications')
</div>
<div class="col-md-10">
<div class="hpanel">
<div class="panel-heading">Organisation User Account</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="user_name" placeholder="Full Name" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="user_email" class="form-control" id="userEmail" placeholder="Enter User Email" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Phone</label>
<div class="col-sm-10">
<input type="text" name="user_phone" class="form-control" id="userPhone" placeholder="Enter User Phone number" required>
</div>
</div>
<div class="hr-line-dashed"></div>
<!-- African Countries Select Field -->
<div class="form-group">
<label class="col-sm-2 control-label">Country</label>
<div class="col-sm-10">
<select name="country" id="countrySelect" class="form-control" required>
<option value="">-- Select Country --</option>
<option value="Algeria" data-currency="DZD">Algeria (DZD)</option>
<option value="Angola" data-currency="AOA">Angola (AOA)</option>
<option value="Benin" data-currency="XOF">Benin (XOF)</option>
<option value="Botswana" data-currency="BWP">Botswana (BWP)</option>
<option value="Burkina Faso" data-currency="XOF">Burkina Faso (XOF)</option>
<option value="Burundi" data-currency="BIF">Burundi (BIF)</option>
<option value="Cameroon" data-currency="XAF">Cameroon (XAF)</option>
<option value="Cape Verde" data-currency="CVE">Cape Verde (CVE)</option>
<option value="Central African Republic" data-currency="XAF">Central African Republic (XAF)</option>
<option value="Chad" data-currency="XAF">Chad (XAF)</option>
<option value="Comoros" data-currency="KMF">Comoros (KMF)</option>
<option value="Congo" data-currency="XAF">Congo (XAF)</option>
<option value="Djibouti" data-currency="DJF">Djibouti (DJF)</option>
<option value="Egypt" data-currency="EGP">Egypt (EGP)</option>
<option value="Equatorial Guinea" data-currency="XAF">Equatorial Guinea (XAF)</option>
<option value="Eritrea" data-currency="ERN">Eritrea (ERN)</option>
<option value="Eswatini" data-currency="SZL">Eswatini (SZL)</option>
<option value="Ethiopia" data-currency="ETB">Ethiopia (ETB)</option>
<option value="Gabon" data-currency="XAF">Gabon (XAF)</option>
<option value="Gambia" data-currency="GMD">Gambia (GMD)</option>
<option value="Ghana" data-currency="GHS">Ghana (GHS)</option>
<option value="Guinea" data-currency="GNF">Guinea (GNF)</option>
<option value="Guinea-Bissau" data-currency="XOF">Guinea-Bissau (XOF)</option>
<option value="Ivory Coast" data-currency="XOF">Ivory Coast (XOF)</option>
<option value="Kenya" data-currency="KES">Kenya (KES)</option>
<option value="Lesotho" data-currency="LSL">Lesotho (LSL)</option>
<option value="Liberia" data-currency="LRD">Liberia (LRD)</option>
<option value="Libya" data-currency="LYD">Libya (LYD)</option>
<option value="Madagascar" data-currency="MGA">Madagascar (MGA)</option>
<option value="Malawi" data-currency="MWK">Malawi (MWK)</option>
<option value="Mali" data-currency="XOF">Mali (XOF)</option>
<option value="Mauritania" data-currency="MRU">Mauritania (MRU)</option>
<option value="Mauritius" data-currency="MUR">Mauritius (MUR)</option>
<option value="Morocco" data-currency="MAD">Morocco (MAD)</option>
<option value="Mozambique" data-currency="MZN">Mozambique (MZN)</option>
<option value="Namibia" data-currency="NAD">Namibia (NAD)</option>
<option value="Niger" data-currency="XOF">Niger (XOF)</option>
<option value="Nigeria" data-currency="NGN">Nigeria (NGN)</option>
<option value="Rwanda" data-currency="RWF">Rwanda (RWF)</option>
<option value="Sao Tome and Principe" data-currency="STN">Sao Tome and Principe (STN)</option>
<option value="Senegal" data-currency="XOF">Senegal (XOF)</option>
<option value="Seychelles" data-currency="SCR">Seychelles (SCR)</option>
<option value="Sierra Leone" data-currency="SLE">Sierra Leone (SLE)</option>
<option value="Somalia" data-currency="SOS">Somalia (SOS)</option>
<option value="South Africa" data-currency="ZAR">South Africa (ZAR)</option>
<option value="South Sudan" data-currency="SSP">South Sudan (SSP)</option>
<option value="Sudan" data-currency="SDG">Sudan (SDG)</option>
<option value="Tanzania" data-currency="TZS">Tanzania (TZS)</option>
<option value="Togo" data-currency="XOF">Togo (XOF)</option>
<option value="Tunisia" data-currency="TND">Tunisia (TND)</option>
<option value="Uganda" data-currency="UGX">Uganda (UGX)</option>
<option value="Zambia" data-currency="ZMW">Zambia (ZMW)</option>
<option value="Zimbabwe" data-currency="ZWL">Zimbabwe (ZWL)</option>
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<!-- Currency Field -->
<div class="form-group">
<label class="col-sm-2 control-label">Currency</label>
<div class="col-sm-10">
<input type="text" name="currency" id="currencyInput" class="form-control" readonly required placeholder="Auto-populated currency">
</div>
</div>
<div class="hr-line-dashed"></div>
</div>
</div>
</div>
<div class="col-md-10">
<div class="form-group">
<div class="col-sm-10">
<button class="btn btn-primary btn-block" type="submit">Submit</button>
<button class="btn btn-default btn-block" type="button">Cancel</button> <br>
</div>
</div>
</div>
</form>
</div>
@endsection
@section('page-js')
<script>
$(document).ready(function() {
// Function to update currency based on selected option's data attribute
function updateCurrency() {
var selectedOption = $('#countrySelect').find(':selected');
var currencyCode = selectedOption.data('currency') || '';
$('#currencyInput').val(currencyCode);
}
// Run on page load in case a default is pre-selected
updateCurrency();
// Run whenever the country dropdown changes
$('#countrySelect').on('change', function() {
updateCurrency();
});
});
</script>
@endsection

View File

@@ -0,0 +1,81 @@
@extends('layouts.admin')
@section('page-title')
Admin | Create User
@endsection
@section('page-css')
<!-- Datatables css -->
<link href="{{url('public/assets/css/vendor/buttons.bootstrap4.css')}}" rel="stylesheet" type="text/css" />
@endsection
@section('page-content')
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="{{url('/')}}">Admin</a></li>
<li class="breadcrumb-item"><a href="{{url('admin/users')}}">Users</a></li>
<li class="breadcrumb-item active">Add User</li>
</ol>
</div>
<h4 class="page-title">Add User</h4>
</div>
</div>
</div>
<!-- end page title -->
{{-- Alert --}}
@include('layouts.alert')
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Add User</h4>
<div class="tab-content">
<div class="tab-pane show active" id="form-row-preview">
<form action="{{url('admin/users')}}" method="POST" >
{{csrf_field()}}
<div class="form-group">
<label for="inputEmail4" class="col-form-label">Full Name</label>
<input required type="text" class="form-control" name="name" placeholder="Full Name">
</div>
<div class="form-group">
<label for="email" class="col-form-label">Email</label>
<input type="email" name="email" class="form-control" id="email" placeholder="Email" >
</div>
<div class="form-group">
<label for="password" class="col-form-label">Password</label>
<input type="password" name="password" class="form-control" id="password" placeholder="Password" >
</div>
<div class="form-group">
<label for="ConfirmPassword" class="col-form-label">Confirm Password</label>
<input type="password" name="password_confirmation" class="form-control" id="ConfirmPassword" placeholder="Confirm Password" >
</div>
<button type="submit" class="btn btn-primary">Create </button>
<button type="reset" class="btn btn-danger">Cancel</button>
</form>
</div>
<!-- end preview-->
</div>
<!-- end tab-content-->
</div>
<!-- end card-body -->
</div>
<!-- end card-->
</div>
<!-- end col -->
</div>
@endsection

Some files were not shown because too many files have changed in this diff Show More