codigo actual del servidor, con avances de joan
This commit is contained in:
15
resources/.editorconfig
Normal file
15
resources/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
|
||||
|
||||
[*]
|
||||
|
||||
charset = utf-8
|
||||
|
||||
end_of_line = lf
|
||||
|
||||
insert_final_newline = true
|
||||
|
||||
indent_style = space
|
||||
|
||||
indent_size = 4
|
||||
30
resources/.htaccess
Normal file
30
resources/.htaccess
Normal file
@@ -0,0 +1,30 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
|
||||
# Disable index view
|
||||
Options -Indexes
|
||||
|
||||
# Hide a specific file
|
||||
<Files .env>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
22
resources/js/app.js
vendored
Normal file
22
resources/js/app.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
window.Vue = require('vue');
|
||||
|
||||
/**
|
||||
* Next, we will create a fresh Vue application instance and attach it to
|
||||
* the page. Then, you may begin adding components to this application
|
||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
||||
*/
|
||||
|
||||
Vue.component('example-component', require('./components/ExampleComponent.vue'));
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app'
|
||||
});
|
||||
56
resources/js/bootstrap.js
vendored
Normal file
56
resources/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
window._ = require('lodash');
|
||||
window.Popper = require('popper.js').default;
|
||||
|
||||
/**
|
||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
||||
* code may be modified to fit the specific needs of your application.
|
||||
*/
|
||||
|
||||
try {
|
||||
window.$ = window.jQuery = require('jquery');
|
||||
|
||||
require('bootstrap');
|
||||
} catch (e) {}
|
||||
|
||||
/**
|
||||
* 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';
|
||||
|
||||
/**
|
||||
* Next we will register the CSRF Token as a common header with Axios so that
|
||||
* all outgoing HTTP requests automatically have it attached. This is just
|
||||
* a simple convenience so we don't have to attach every token manually.
|
||||
*/
|
||||
|
||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
|
||||
if (token) {
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||
} else {
|
||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
// encrypted: true
|
||||
// });
|
||||
23
resources/js/components/ExampleComponent.vue
Normal file
23
resources/js/components/ExampleComponent.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">Example Component</div>
|
||||
|
||||
<div class="card-body">
|
||||
I'm an example component.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
console.log('Component mounted.')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
19
resources/lang/en/auth.php
Normal file
19
resources/lang/en/auth.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
||||
19
resources/lang/en/pagination.php
Normal file
19
resources/lang/en/pagination.php
Normal 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' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
||||
22
resources/lang/en/passwords.php
Normal file
22
resources/lang/en/passwords.php
Normal 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.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have e-mailed your password reset link!',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that e-mail address.",
|
||||
|
||||
];
|
||||
146
resources/lang/en/validation.php
Normal file
146
resources/lang/en/validation.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?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.',
|
||||
'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 may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||
'alpha_num' => 'The :attribute may 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.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'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.',
|
||||
'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 :value.',
|
||||
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than or equal :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 :value.',
|
||||
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may 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.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'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 is 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.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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 attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
20
resources/sass/_variables.scss
vendored
Normal file
20
resources/sass/_variables.scss
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
// Body
|
||||
$body-bg: #f8fafc;
|
||||
|
||||
// Typography
|
||||
$font-family-sans-serif: "Nunito", sans-serif;
|
||||
$font-size-base: 0.9rem;
|
||||
$line-height-base: 1.6;
|
||||
|
||||
// Colors
|
||||
$blue: #3490dc;
|
||||
$indigo: #6574cd;
|
||||
$purple: #9561e2;
|
||||
$pink: #f66D9b;
|
||||
$red: #e3342f;
|
||||
$orange: #f6993f;
|
||||
$yellow: #ffed4a;
|
||||
$green: #38c172;
|
||||
$teal: #4dc0b5;
|
||||
$cyan: #6cb2eb;
|
||||
14
resources/sass/app.scss
vendored
Normal file
14
resources/sass/app.scss
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
// Fonts
|
||||
@import url('https://fonts.googleapis.com/css?family=Nunito');
|
||||
|
||||
// Variables
|
||||
@import 'variables';
|
||||
|
||||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
.navbar-laravel {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
61
resources/views/affiliate/affiliate_logs.blade.php
Normal file
61
resources/views/affiliate/affiliate_logs.blade.php
Normal file
@@ -0,0 +1,61 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Affiliate Logs')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th data-breakpoints="lg">{{ translate('Referred By')}}</th>
|
||||
<th>{{ translate('Referral User')}}</th>
|
||||
<th>{{ translate('Amount')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Order Id')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Referral Type') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Product') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Date') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($affiliate_logs as $key => $affiliate_log)
|
||||
@if ($affiliate_log->user != null)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($affiliate_logs->currentPage() - 1)*$affiliate_logs->perPage() }}</td>
|
||||
<td>
|
||||
{{ optional(\App\Models\User::where('id', $affiliate_log->referred_by_user)->first())->name }}
|
||||
</td>
|
||||
<td>
|
||||
@if($affiliate_log->user_id !== null)
|
||||
{{ optional($affiliate_log->user)->name }}
|
||||
@else
|
||||
{{ translate('Guest').' ('. $affiliate_log->guest_id.')' }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ single_price($affiliate_log->amount) }}</td>
|
||||
<td>
|
||||
@if($affiliate_log->order_id != null)
|
||||
{{ optional($affiliate_log->order)->code }}
|
||||
@else
|
||||
{{ optional($affiliate_log->order_detail->order)->code }}
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ ucwords(str_replace('_',' ', $affiliate_log->affiliate_type)) }}</td>
|
||||
<td>
|
||||
@if($affiliate_log->order_detail_id != null && $affiliate_log->order_detail)
|
||||
{{ optional($affiliate_log->order_detail->product)->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $affiliate_log->created_at->format('d, F Y') }} </td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $affiliate_logs->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
47
resources/views/affiliate/affiliate_withdraw_modal.blade.php
Normal file
47
resources/views/affiliate/affiliate_withdraw_modal.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<form action="{{ route('withdraw_request.payment_store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Affiliate Withdraw Request')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-bordered" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ translate('Paypal Email') }}</td>
|
||||
<td>{{ $affiliate_user->paypal_email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ translate('Bank Information') }}</td>
|
||||
<td>{{ $affiliate_user->bank_information }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="affiliate_user_id" value="{{ $affiliate_user->id }}">
|
||||
<input type="hidden" name="affiliate_withdraw_request_id" value="{{ $affiliate_withdraw_request->id }}">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="amount">{{translate('Amount')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="hidden" name="amount" value="{{$affiliate_withdraw_request->amount}}" class="form-control">
|
||||
<input type="number" value="{{$affiliate_withdraw_request->amount}}" class="form-control" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="payment_method">{{translate('Payment Method')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="payment_method" id="payment_method" class="form-control aiz-selectpicker" required>
|
||||
<option value="">{{translate('Select Payment Method')}}</option>
|
||||
<option value="Paypal">{{translate('Paypal')}}</option>
|
||||
<option value="Bank">{{translate('Bank')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-sm btn-primary" type="submit">{{ translate('Pay')}}</button>
|
||||
<button type="button" class="btn btn-sm btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
117
resources/views/affiliate/affiliate_withdraw_requests.blade.php
Normal file
117
resources/views/affiliate/affiliate_withdraw_requests.blade.php
Normal file
@@ -0,0 +1,117 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Affiliate Withdraw Request')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th data-breakpoints="lg">{{translate('Date')}}</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Email')}}</th>
|
||||
<th>{{translate('Amount')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Status')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($affiliate_withdraw_requests as $key => $affiliate_withdraw_request)
|
||||
@php $status = $affiliate_withdraw_request->status ; @endphp
|
||||
@if ($affiliate_withdraw_request->user != null)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($affiliate_withdraw_requests->currentPage() - 1)*$affiliate_withdraw_requests->perPage() }}</td>
|
||||
<td>{{ $affiliate_withdraw_request->created_at}}</td>
|
||||
<td>{{ optional($affiliate_withdraw_request->user)->name}}</td>
|
||||
<td>{{ optional($affiliate_withdraw_request->user)->email}}</td>
|
||||
<td>{{ single_price($affiliate_withdraw_request->amount)}}</td>
|
||||
<td>
|
||||
@if($status == 1)
|
||||
<span class="badge badge-inline badge-success">{{translate('Approved')}}</span>
|
||||
@elseif($status == 2)
|
||||
<span class="badge badge-inline badge-danger">{{translate('Rejected')}}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-info">{{translate('Pending')}}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if($status == 0)
|
||||
@can('accept_affiliate_withdraw_requests')
|
||||
<a href="#" class="btn btn-soft-primary btn-icon btn-circle btn-sm" onclick="show_affiliate_withdraw_modal('{{$affiliate_withdraw_request->id}}');" title="{{ translate('Pay Now') }}">
|
||||
<i class="las la-money-bill"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('reject_affiliate_withdraw_request')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm" onclick="affiliate_withdraw_reject_modal('{{route('affiliate.withdraw_request.reject', $affiliate_withdraw_request->id)}}');" title="{{ translate('Reject') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@else
|
||||
{{ translate('No Action Available')}}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clearfix">
|
||||
<div class="pull-right">
|
||||
{{ $affiliate_withdraw_requests->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
|
||||
<div class="modal fade" id="affiliate_withdraw_modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="affiliate_withdraw_reject_modal">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{ translate('Affiliate Withdraw Request Reject')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Are you sure, You want to reject this?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a href="#" id="reject_link" class="btn btn-primary">{{ translate('Reject') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function show_affiliate_withdraw_modal(id){
|
||||
$.post('{{ route('affiliate_withdraw_modal') }}',{_token:'{{ @csrf_token() }}', id:id}, function(data){
|
||||
$('#affiliate_withdraw_modal #modal-content').html(data);
|
||||
$('#affiliate_withdraw_modal').modal('show', {backdrop: 'static'});
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
});
|
||||
}
|
||||
function affiliate_withdraw_reject_modal(reject_link){
|
||||
$('#affiliate_withdraw_reject_modal').modal('show');
|
||||
document.getElementById('reject_link').setAttribute('href' , reject_link);
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
192
resources/views/affiliate/configs.blade.php
Normal file
192
resources/views/affiliate/configs.blade.php
Normal file
@@ -0,0 +1,192 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Affiliate Registration Form')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('affiliate.configs.store') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-8 form-horizontal" id="form">
|
||||
@foreach (json_decode(\App\Models\AffiliateConfig::where('type', 'verification_form')->first()->value) as $key => $element)
|
||||
@if ($element->type == 'text' || $element->type == 'file')
|
||||
<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">
|
||||
<input type="hidden" name="type[]" value="{{ $element->type }}">
|
||||
<div class="col-lg-3">
|
||||
<label class="control-label">{{ ucfirst($element->type) }}</label>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<input class="form-control" type="text" name="label[]" value="{{ $element->label }}" placeholder="Label">
|
||||
</div>
|
||||
<div class="col-lg-2"><span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span></div>
|
||||
</div>
|
||||
@elseif ($element->type == 'select' || $element->type == 'multi_select' || $element->type == 'radio')
|
||||
<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">
|
||||
<input type="hidden" name="type[]" value="{{ $element->type }}">
|
||||
<input type="hidden" name="option[]" class="option" value="{{ $key }}">
|
||||
<div class="col-lg-3">
|
||||
<label class="control-label">{{ ucfirst(str_replace('_', ' ', $element->type)) }}</label>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<input class="form-control" type="text" name="label[]" value="{{ $element->label }}" placeholder="Select Label" style="margin-bottom:10px">
|
||||
<div class="customer_choice_options_types_wrap_child">
|
||||
@if (is_array(json_decode($element->options)))
|
||||
@foreach (json_decode($element->options) as $value)
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6 col-sm-offset-4">
|
||||
<input class="form-control" type="text" name="options_{{ $key }}[]" value="{{ $value }}" required="">
|
||||
</div>
|
||||
<div class="col-sm-2"> <span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span></div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<button class="btn btn-success pull-right" type="button" onclick="add_customer_choice_options(this)"><i class="glyphicon glyphicon-plus"></i> Add option</button>
|
||||
</div>
|
||||
<div class="col-lg-2"><span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span></div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item btn" style="text-align: left;" onclick="appenddToForm('text')">{{translate('Text Input')}}</li>
|
||||
<li class="list-group-item btn" style="text-align: left;" onclick="appenddToForm('select')">{{translate('Select')}}</li>
|
||||
<li class="list-group-item btn" style="text-align: left;" onclick="appenddToForm('multi-select')">{{translate('Multiple Select')}}</li>
|
||||
<li class="list-group-item btn" style="text-align: left;" onclick="appenddToForm('radio')">{{translate('Radio')}}</li>
|
||||
<li class="list-group-item btn" style="text-align: left;" onclick="appenddToForm('file')">{{translate('File')}}</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
var i = 0;
|
||||
|
||||
function add_customer_choice_options(em){
|
||||
var j = $(em).closest('.form-group.row').find('.option').val();
|
||||
var str = '<div class="form-group row">'
|
||||
+'<div class="col-sm-6 col-sm-offset-4">'
|
||||
+'<input class="form-control" type="text" name="options_'+j+'[]" value="" required>'
|
||||
+'</div>'
|
||||
+'<div class="col-sm-2"> <span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
$(em).parent().find('.customer_choice_options_types_wrap_child').append(str);
|
||||
}
|
||||
function delete_choice_clearfix(em){
|
||||
$(em).parent().parent().remove();
|
||||
}
|
||||
function appenddToForm(type){
|
||||
//$('#form').removeClass('seller_form_border');
|
||||
if(type == 'text'){
|
||||
var str = '<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">'
|
||||
+'<input type="hidden" name="type[]" value="text">'
|
||||
+'<div class="col-lg-3">'
|
||||
+'<label class="control-label">Text</label>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-7">'
|
||||
+'<input class="form-control" type="text" name="label[]" placeholder="Label">'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-2">'
|
||||
+'<span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('#form').append(str);
|
||||
}
|
||||
else if (type == 'select') {
|
||||
i++;
|
||||
var str = '<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">'
|
||||
+'<input type="hidden" name="type[]" value="select"><input type="hidden" name="option[]" class="option" value="'+i+'">'
|
||||
+'<div class="col-lg-3">'
|
||||
+'<label class="control-label">Select</label>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-7">'
|
||||
+'<input class="form-control" type="text" name="label[]" placeholder="Select Label" style="margin-bottom:10px">'
|
||||
+'<div class="customer_choice_options_types_wrap_child">'
|
||||
|
||||
+'</div>'
|
||||
+'<button class="btn btn-success pull-right" type="button" onclick="add_customer_choice_options(this)"><i class="glyphicon glyphicon-plus"></i> Add option</button>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-2">'
|
||||
+'<span class="btn btn-icon btn-circle icon-lg fa fa-times" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('#form').append(str);
|
||||
}
|
||||
else if (type == 'multi-select') {
|
||||
i++;
|
||||
var str = '<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">'
|
||||
+'<input type="hidden" name="type[]" value="multi_select"><input type="hidden" name="option[]" class="option" value="'+i+'">'
|
||||
+'<div class="col-lg-3">'
|
||||
+'<label class="control-label">Multiple select</label>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-7">'
|
||||
+'<input class="form-control" type="text" name="label[]" placeholder="Multiple Select Label" style="margin-bottom:10px">'
|
||||
+'<div class="customer_choice_options_types_wrap_child">'
|
||||
|
||||
+'</div>'
|
||||
+'<button class="btn btn-success pull-right" type="button" onclick="add_customer_choice_options(this)"><i class="glyphicon glyphicon-plus"></i> Add option</button>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-2">'
|
||||
+'<span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('#form').append(str);
|
||||
}
|
||||
else if (type == 'radio') {
|
||||
i++;
|
||||
var str = '<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">'
|
||||
+'<input type="hidden" name="type[]" value="radio"><input type="hidden" name="option[]" class="option" value="'+i+'">'
|
||||
+'<div class="col-lg-3">'
|
||||
+'<label class="control-label">Radio</label>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-7">'
|
||||
+'<input class="form-control" type="text" name="label[]" placeholder="Radio Label" style="margin-bottom:10px">'
|
||||
+'<div class="customer_choice_options_types_wrap_child">'
|
||||
|
||||
+'</div>'
|
||||
+'<button class="btn btn-success pull-right" type="button" onclick="add_customer_choice_options(this)"><i class="glyphicon glyphicon-plus"></i> Add option</button>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-2">'
|
||||
+'<span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('#form').append(str);
|
||||
}
|
||||
else if (type == 'file') {
|
||||
var str = '<div class="form-group row" style="background:rgba(0,0,0,0.1);padding:10px 0;">'
|
||||
+'<input type="hidden" name="type[]" value="file">'
|
||||
+'<div class="col-lg-3">'
|
||||
+'<label class="control-label">File</label>'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-7">'
|
||||
+'<input class="form-control" type="text" name="label[]" placeholder="Label">'
|
||||
+'</div>'
|
||||
+'<div class="col-lg-2">'
|
||||
+'<span class="btn btn-icon btn-circle" onclick="delete_choice_clearfix(this)"><i class="las la-times"></i></span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('#form').append(str);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
169
resources/views/affiliate/frontend/apply_for_affiliate.blade.php
Normal file
169
resources/views/affiliate/frontend/apply_for_affiliate.blade.php
Normal file
@@ -0,0 +1,169 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="pt-4 mb-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-center text-lg-left">
|
||||
<h1 class="fw-600 h4">{{ translate('Affiliate Informations') }}</h1>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ul class="breadcrumb bg-transparent p-0 justify-content-center justify-content-lg-end">
|
||||
<li class="breadcrumb-item opacity-50">
|
||||
<a class="text-reset" href="{{ route('home') }}">{{ translate('Home') }}</a>
|
||||
</li>
|
||||
<li class="text-dark fw-600 breadcrumb-item">
|
||||
<a class="text-reset" href="{{ route('affiliate.apply') }}">"{{ translate('Affiliate') }}"</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<form class="" action="{{ route('affiliate.store_affiliate_user') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if (!Auth::check())
|
||||
<div class="card rounded-0 shadow-none">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-15 fw-600">{{translate('User Info')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group--style-1">
|
||||
<input type="text" class="form-control rounded-0{{ $errors->has('name') ? ' is-invalid' : '' }}" value="{{ old('name') }}" placeholder="{{ translate('Name') }}" name="name">
|
||||
<span class="input-group-addon">
|
||||
<i class="las la-user"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group--style-1">
|
||||
<input type="email" class="form-control rounded-0{{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ old('email') }}" placeholder="{{ translate('Email') }}" name="email">
|
||||
<span class="input-group-addon">
|
||||
<i class="las la-envelope"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group--style-1">
|
||||
<input type="password" class="form-control rounded-0{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="{{ translate('Password') }}" name="password">
|
||||
<span class="input-group-addon">
|
||||
<i class="las la-lock"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group--style-1">
|
||||
<input type="password" class="form-control rounded-0" placeholder="{{ translate('Confirm Password') }}" name="password_confirmation">
|
||||
<span class="input-group-addon">
|
||||
<i class=" las la-lock"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card rounded-0 shadow-none">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-15 fw-600">{{translate('Verification info')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@php
|
||||
$verification_form = \App\Models\AffiliateConfig::where('type', 'verification_form')->first()->value;
|
||||
@endphp
|
||||
@foreach (json_decode($verification_form) as $key => $element)
|
||||
@if ($element->type == 'text')
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-form-label">{{ $element->label }} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="{{ $element->type }}" class="form-control rounded-0 mb-3" placeholder="{{ $element->label }}" name="element_{{ $key }}" required>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($element->type == 'file')
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-form-label">{{ $element->label }}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="{{ $element->type }}" name="element_{{ $key }}" id="file-{{ $key }}" class="custom-input-file custom-input-file--4" data-multiple-caption="{count} files selected" required/>
|
||||
<label for="file-{{ $key }}" class="mw-100 mb-3">
|
||||
<span></span>
|
||||
<strong>
|
||||
<i class="fa fa-upload"></i>
|
||||
{{translate('Choose file')}}
|
||||
</strong>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@elseif ($element->type == 'select' && is_array(json_decode($element->options)))
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-form-label">{{ $element->label }}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="mb-3">
|
||||
<select class="form-control rounded-0 selectpicker" data-minimum-results-for-search="Infinity" name="element_{{ $key }}" required>
|
||||
@foreach (json_decode($element->options) as $value)
|
||||
<option value="{{ $value }}">{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@elseif ($element->type == 'multi_select' && is_array(json_decode($element->options)))
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-form-label">{{ $element->label }}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="mb-3">
|
||||
<select class="form-control rounded-0 selectpicker" data-minimum-results-for-search="Infinity" name="element_{{ $key }}[]" multiple required>
|
||||
@foreach (json_decode($element->options) as $value)
|
||||
<option value="{{ $value }}">{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@elseif ($element->type == 'radio')
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-form-label">{{ $element->label }}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="mb-3">
|
||||
@foreach (json_decode($element->options) as $value)
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" name="element_{{ $key }}" value="{{ $value }}" id="{{ $value }}" required>
|
||||
<label for="{{ $value }}">{{ $value }}</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary rounded-0 w-150px">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@endsection
|
||||
294
resources/views/affiliate/frontend/index.blade.php
Normal file
294
resources/views/affiliate/frontend/index.blade.php
Normal file
@@ -0,0 +1,294 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-start">
|
||||
@include('frontend.inc.user_side_nav')
|
||||
<div class="aiz-user-panel">
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Affiliate') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row gutters-16 mb-2">
|
||||
<!-- Affiliate Balance -->
|
||||
<div class="col-md-4 mx-auto mb-4" >
|
||||
<div class="bg-dark text-white overflow-hidden text-center p-4 h-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="17.402" height="32" viewBox="0 0 17.402 32">
|
||||
<path id="Path_32606" data-name="Path 32606" d="M14.888-4.338a4.994,4.994,0,0,0-2.021-1.9,6.687,6.687,0,0,0-3.175-.7,5.029,5.029,0,0,0-3.258.969,3.108,3.108,0,0,0-1.2,2.536q0,2.515,3.34,3.175l3.052.577a13.933,13.933,0,0,1,2.8.825,7.913,7.913,0,0,1,2.227,1.381,5.876,5.876,0,0,1,1.485,2.082A7.211,7.211,0,0,1,18.682,7.5a6.445,6.445,0,0,1-.536,2.7,6.111,6.111,0,0,1-1.505,2.041A7.129,7.129,0,0,1,14.332,13.6a11.987,11.987,0,0,1-2.907.66v2.474a1.62,1.62,0,0,1-.371,1.093,1.334,1.334,0,0,1-1.072.433,1.334,1.334,0,0,1-1.072-.433,1.62,1.62,0,0,1-.371-1.093V14.219A9.33,9.33,0,0,1,5.61,13.5a9.09,9.09,0,0,1-2.082-1.258,6.581,6.581,0,0,1-1.34-1.464,6.227,6.227,0,0,1-.7-1.381,2.691,2.691,0,0,1-.206-.948A1.548,1.548,0,0,1,1.734,7.27a1.6,1.6,0,0,1,1.155-.433,1.3,1.3,0,0,1,.928.33,3.373,3.373,0,0,1,.639.866,13.046,13.046,0,0,0,.763,1.175A4.954,4.954,0,0,0,6.332,10.3a5.722,5.722,0,0,0,1.67.8,7.922,7.922,0,0,0,2.351.309,4.989,4.989,0,0,0,3.629-1.175,3.727,3.727,0,0,0,1.2-2.742,3.53,3.53,0,0,0-1.052-2.763,6.445,6.445,0,0,0-3.072-1.361L7.837,2.755A8.572,8.572,0,0,1,3.115.507a5.631,5.631,0,0,1-1.381-3.9A5.738,5.738,0,0,1,3.589-7.843,8.258,8.258,0,0,1,8.538-9.822v-2.433a1.45,1.45,0,0,1,.412-1.072,1.45,1.45,0,0,1,1.072-.412,1.316,1.316,0,0,1,1.031.412,1.542,1.542,0,0,1,.371,1.072v2.474a9.785,9.785,0,0,1,2.412.66,9.885,9.885,0,0,1,1.856,1.031,6.7,6.7,0,0,1,1.32,1.216,6.849,6.849,0,0,1,.8,1.216A2.018,2.018,0,0,1,18.1-4.627,1.4,1.4,0,0,1,17.692-3.6a1.5,1.5,0,0,1-1.113.412,1.5,1.5,0,0,1-.99-.309A3.423,3.423,0,0,1,14.888-4.338Z" transform="translate(-1.28 13.74)" fill="#fff"/>
|
||||
</svg>
|
||||
<div class="py-2 mt-2">
|
||||
<div class="fs-14 fw-400 text-center">{{ translate('Affiliate Balance') }}</div>
|
||||
<div class="fs-30 fw-700 text-center">{{ single_price(Auth::user()->affiliate_user->balance) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Configure Payout -->
|
||||
<div class="col-md-4 mx-auto mb-4" >
|
||||
<a href="{{ route('affiliate.payment_settings') }}">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="size-60px rounded-circle mx-auto bg-dark d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-cog la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-14 fw-600 text-dark">{{ translate('Configure Payout') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Affiliate Withdraw Request -->
|
||||
<div class="col-md-4 mx-auto mb-4" >
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light" onclick="show_affiliate_withdraw_modal()">
|
||||
<span class="size-60px rounded-circle mx-auto bg-dark d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-14 fw-600 text-dark">{{ translate('Affiliate Withdraw Request') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Copy Url -->
|
||||
@if (addon_is_activated('affiliate_system')
|
||||
&& \App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->status)
|
||||
<div class="row">
|
||||
@php
|
||||
if(Auth::user()->referral_code == null){
|
||||
Auth::user()->referral_code = substr(Auth::user()->id.Str::random(), 0, 10);
|
||||
Auth::user()->save();
|
||||
}
|
||||
$referral_code = Auth::user()->referral_code;
|
||||
$referral_code_url = URL::to('/users/registration')."?referral_code=$referral_code";
|
||||
@endphp
|
||||
<div class="col mb-2">
|
||||
<div class="card rounded-0 shadow-none border mb-4">
|
||||
<div class="form-box-content p-4">
|
||||
<div class="row gutters-16">
|
||||
<div class="col-lg-10 col-sm-9 form-group mb-3 mb-sm-0">
|
||||
<textarea id="referral_code_url" class="form-control rounded-0" readonly type="text">{{$referral_code_url}}</textarea>
|
||||
</div>
|
||||
<div class="col-lg-2 col-sm-3">
|
||||
<button type=button id="ref-cpurl-btn" class="btn btn-primary btn-block rounded-0" data-attrcpy="{{translate('Copied')}}" onclick="copyToClipboard('url')" >{{translate('Copy Url')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Affiliate Stats -->
|
||||
<div class="card rounded-0 shadow-none border mb-3">
|
||||
<form class="" id="sort_blogs" action="" method="GET">
|
||||
<div class="card-header border-bottom-0 row pt-4">
|
||||
<div class="col text-center text-md-left">
|
||||
<h5 class="mb-md-0 fs-18 fw-700 text-dark">{{translate('Affiliate Status')}}</h5>
|
||||
</div>
|
||||
<div class="col-md-5 col-xl-4">
|
||||
<div class="input-group mb-0">
|
||||
<select class="form-control aiz-selectpicker" name="type" data-live-search="true">
|
||||
<option value="">Choose</option>
|
||||
<option value="Today" @if($type == 'Today') selected @endif>Today</option>
|
||||
<option value="7" @if($type == '7') selected @endif>Last 7 Days</option>
|
||||
<option value="30" @if($type == '30') selected @endif>Last 30 Days</option>
|
||||
</select>
|
||||
<button class="btn btn-primary rounded-0 input-group-append" type="submit">{{ translate('Filter') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row gutters-16">
|
||||
<!-- No. of Click -->
|
||||
<div class="col-md-3 mx-auto mb-3">
|
||||
<a href="#">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="fs-30 fw-700 text-dark mb-3">
|
||||
@if($affliate_stats->count_click)
|
||||
{{ $affliate_stats->count_click }}
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
</span>
|
||||
<div class="fs-14 fw-700 text-dark">{{ translate('No. of Click') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- No. of Item -->
|
||||
<div class="col-md-3 mx-auto mb-3" >
|
||||
<a href="#">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="fs-30 fw-700 text-dark">
|
||||
@if($affliate_stats->count_item)
|
||||
{{ $affliate_stats->count_item }}
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
</span>
|
||||
<div class="fs-14 fw-700 text-dark">{{ translate('No. of Item') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- No. of Deliverd -->
|
||||
<div class="col-md-3 mx-auto mb-3" >
|
||||
<a href="#">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="fs-30 fw-700 text-dark">
|
||||
@if($affliate_stats->count_delivered)
|
||||
{{ $affliate_stats->count_delivered }}
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
</span>
|
||||
<div class="fs-14 fw-700 text-dark">{{ translate('No. of Deliverd') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- No. of Cancel -->
|
||||
<div class="col-md-3 mx-auto mb-3" >
|
||||
<a href="#">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="fs-30 fw-700 text-dark">
|
||||
@if($affliate_stats->count_cancel)
|
||||
{{ $affliate_stats->count_cancel }}
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
</span>
|
||||
<div class="fs-14 fw-700 text-dark">{{ translate('No. of Cancel') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<!-- Affiliate Earning History -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark mt-4">{{translate('Affiliate Earning History')}}</h5>
|
||||
</div>
|
||||
<div class="card-body pt-0">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">#</th>
|
||||
<th>{{ translate('Referral User')}}</th>
|
||||
<th>{{ translate('Amount')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Order Id')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Referral Type') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Product') }}</th>
|
||||
<th data-breakpoints="lg" class="text-right pr-0">{{ translate('Date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="fs-14">
|
||||
@foreach($affiliate_logs as $key => $affiliate_log)
|
||||
<tr>
|
||||
<td class="pl-0" style="vertical-align: middle;">{{ sprintf('%02d', ($key+1) + ($affiliate_logs->currentPage() - 1)*$affiliate_logs->perPage()) }}</td>
|
||||
<td class="fw-700" style="vertical-align: middle;">
|
||||
@if($affiliate_log->user_id !== null)
|
||||
{{ $affiliate_log->user->name }}
|
||||
@else
|
||||
{{ translate('Guest').' ('. $affiliate_log->guest_id.')' }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="fw-700" style="vertical-align: middle;">{{ single_price($affiliate_log->amount) }}</td>
|
||||
<td class="fw-700 text-primary" style="vertical-align: middle;">
|
||||
@if($affiliate_log->order_id != null)
|
||||
{{ $affiliate_log->order->code }}
|
||||
@else
|
||||
{{ $affiliate_log->order_detail->order->code }}
|
||||
@endif
|
||||
</td>
|
||||
<td style="vertical-align: middle;"> {{ ucwords(str_replace('_',' ', $affiliate_log->affiliate_type)) }}</td>
|
||||
<td class="fw-700" style="vertical-align: middle;">
|
||||
@if($affiliate_log->order_detail_id != null)
|
||||
@php
|
||||
$url = $affiliate_log->order_detail->product->auction_product == 1 ? route('auction-product', $affiliate_log->order_detail->product->slug) : route('product', $affiliate_log->order_detail->product->slug)
|
||||
@endphp
|
||||
<a href="{{ $url }}" target="_blank"
|
||||
title="{{ $affiliate_log->order_detail->product->name }}" class="text-reset text-truncate hov-text-primary">
|
||||
{{ $affiliate_log->order_detail->product->name }}
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right pr-0" style="vertical-align: middle;">{{ $affiliate_log->created_at->format('d-m-Y') }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $affiliate_logs->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Affiliate Withdraw Modal -->
|
||||
<div class="modal fade" id="affiliate_withdraw_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{ translate('Affiliate Withdraw Request') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form class="" action="{{ route('affiliate.withdraw_request.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body gry-bg px-3 pt-3">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{ translate('Amount')}} <span class="text-danger">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="number" class="form-control mb-3 rounded-0" name="amount" min="1" max="{{ Auth::user()->affiliate_user->balance }}" placeholder="{{ translate('Amount')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary rounded-0 transition-3d-hover mr-1">{{translate('Confirm')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function copyToClipboard(btn){
|
||||
// var el_code = document.getElementById('referral_code');
|
||||
var el_url = document.getElementById('referral_code_url');
|
||||
// var c_b = document.getElementById('ref-cp-btn');
|
||||
var c_u_b = document.getElementById('ref-cpurl-btn');
|
||||
|
||||
// if(btn == 'code'){
|
||||
// if(el_code != null && c_b != null){
|
||||
// el_code.select();
|
||||
// document.execCommand('copy');
|
||||
// c_b .innerHTML = c_b.dataset.attrcpy;
|
||||
// }
|
||||
// }
|
||||
|
||||
if(btn == 'url'){
|
||||
if(el_url != null && c_u_b != null){
|
||||
el_url.select();
|
||||
document.execCommand('copy');
|
||||
c_u_b .innerHTML = c_u_b.dataset.attrcpy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function show_affiliate_withdraw_modal(){
|
||||
$('#affiliate_withdraw_modal').modal('show');
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
140
resources/views/affiliate/frontend/payment_history.blade.php
Normal file
140
resources/views/affiliate/frontend/payment_history.blade.php
Normal file
@@ -0,0 +1,140 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-start">
|
||||
@include('frontend.inc.user_side_nav')
|
||||
<div class="aiz-user-panel">
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Affiliate') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-16 mb-2">
|
||||
<!-- Affiliate Balance -->
|
||||
<div class="col-md-6 mx-auto mb-4" >
|
||||
<div class="bg-dark text-white overflow-hidden text-center p-4 h-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="17.402" height="32" viewBox="0 0 17.402 32">
|
||||
<path id="Path_32606" data-name="Path 32606" d="M14.888-4.338a4.994,4.994,0,0,0-2.021-1.9,6.687,6.687,0,0,0-3.175-.7,5.029,5.029,0,0,0-3.258.969,3.108,3.108,0,0,0-1.2,2.536q0,2.515,3.34,3.175l3.052.577a13.933,13.933,0,0,1,2.8.825,7.913,7.913,0,0,1,2.227,1.381,5.876,5.876,0,0,1,1.485,2.082A7.211,7.211,0,0,1,18.682,7.5a6.445,6.445,0,0,1-.536,2.7,6.111,6.111,0,0,1-1.505,2.041A7.129,7.129,0,0,1,14.332,13.6a11.987,11.987,0,0,1-2.907.66v2.474a1.62,1.62,0,0,1-.371,1.093,1.334,1.334,0,0,1-1.072.433,1.334,1.334,0,0,1-1.072-.433,1.62,1.62,0,0,1-.371-1.093V14.219A9.33,9.33,0,0,1,5.61,13.5a9.09,9.09,0,0,1-2.082-1.258,6.581,6.581,0,0,1-1.34-1.464,6.227,6.227,0,0,1-.7-1.381,2.691,2.691,0,0,1-.206-.948A1.548,1.548,0,0,1,1.734,7.27a1.6,1.6,0,0,1,1.155-.433,1.3,1.3,0,0,1,.928.33,3.373,3.373,0,0,1,.639.866,13.046,13.046,0,0,0,.763,1.175A4.954,4.954,0,0,0,6.332,10.3a5.722,5.722,0,0,0,1.67.8,7.922,7.922,0,0,0,2.351.309,4.989,4.989,0,0,0,3.629-1.175,3.727,3.727,0,0,0,1.2-2.742,3.53,3.53,0,0,0-1.052-2.763,6.445,6.445,0,0,0-3.072-1.361L7.837,2.755A8.572,8.572,0,0,1,3.115.507a5.631,5.631,0,0,1-1.381-3.9A5.738,5.738,0,0,1,3.589-7.843,8.258,8.258,0,0,1,8.538-9.822v-2.433a1.45,1.45,0,0,1,.412-1.072,1.45,1.45,0,0,1,1.072-.412,1.316,1.316,0,0,1,1.031.412,1.542,1.542,0,0,1,.371,1.072v2.474a9.785,9.785,0,0,1,2.412.66,9.885,9.885,0,0,1,1.856,1.031,6.7,6.7,0,0,1,1.32,1.216,6.849,6.849,0,0,1,.8,1.216A2.018,2.018,0,0,1,18.1-4.627,1.4,1.4,0,0,1,17.692-3.6a1.5,1.5,0,0,1-1.113.412,1.5,1.5,0,0,1-.99-.309A3.423,3.423,0,0,1,14.888-4.338Z" transform="translate(-1.28 13.74)" fill="#fff"/>
|
||||
</svg>
|
||||
<div class="py-2 mt-2">
|
||||
<div class="fs-14 fw-400 text-center">{{ translate('Affiliate Balance') }}</div>
|
||||
<div class="fs-30 fw-700 text-center">{{ single_price(Auth::user()->affiliate_user->balance) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Affiliate Withdraw Request -->
|
||||
<div class="col-md-6 mx-auto mb-4">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light" onclick="show_affiliate_withdraw_modal()">
|
||||
<span class="size-60px rounded-circle mx-auto bg-dark d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-14 fw-600 text-dark">{{ translate('Affiliate Withdraw Request') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Affiliate payment history -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-20 fw-700 text-dark">{{ translate('Affiliate payment history')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">#</th>
|
||||
<th>{{ translate('Date') }}</th>
|
||||
<th>{{translate('Amount')}}</th>
|
||||
<th class="pr-0">{{translate('Payment Method')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="fs-14">
|
||||
@foreach ($affiliate_payments as $key => $affiliate_payment)
|
||||
<tr>
|
||||
<td class="pl-0">{{ sprintf('%02d', $key+1) }}</td>
|
||||
<td>{{ date('d-m-Y', strtotime($affiliate_payment->created_at)) }}</td>
|
||||
<td>{{ single_price($affiliate_payment->amount) }}</td>
|
||||
<td class="pr-0">{{ ucfirst(str_replace('_', ' ', $affiliate_payment ->payment_method)) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $affiliate_payments->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Affiliate Withdraw Modal -->
|
||||
<div class="modal fade" id="affiliate_withdraw_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{ translate('Affiliate Withdraw Request') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form class="" action="{{ route('affiliate.withdraw_request.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body gry-bg px-3 pt-3">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{ translate('Amount')}} <span class="text-danger">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="number" class="form-control mb-3 rounded-0" name="amount" min="1" max="{{ Auth::user()->affiliate_user->balance }}" placeholder="{{ translate('Amount')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary rounded-0 transition-3d-hover mr-1">{{translate('Confirm')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function copyToClipboard(btn){
|
||||
// var el_code = document.getElementById('referral_code');
|
||||
var el_url = document.getElementById('referral_code_url');
|
||||
// var c_b = document.getElementById('ref-cp-btn');
|
||||
var c_u_b = document.getElementById('ref-cpurl-btn');
|
||||
|
||||
// if(btn == 'code'){
|
||||
// if(el_code != null && c_b != null){
|
||||
// el_code.select();
|
||||
// document.execCommand('copy');
|
||||
// c_b .innerHTML = c_b.dataset.attrcpy;
|
||||
// }
|
||||
// }
|
||||
|
||||
if(btn == 'url'){
|
||||
if(el_url != null && c_u_b != null){
|
||||
el_url.select();
|
||||
document.execCommand('copy');
|
||||
c_u_b .innerHTML = c_u_b.dataset.attrcpy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function show_affiliate_withdraw_modal(){
|
||||
$('#affiliate_withdraw_modal').modal('show');
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,47 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-start">
|
||||
@include('frontend.inc.user_side_nav')
|
||||
|
||||
<div class="aiz-user-panel">
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Affiliate') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{ translate('Payment Settings')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('affiliate.payment_settings_store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label">{{translate('Paypal Email')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="email" class="form-control rounded-0" placeholder="{{ translate('Paypal Email')}}" name="paypal_email" value="{{ $affiliate_user->paypal_email }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label">{{translate('Bank Informations')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" placeholder="{{ translate('Acc. No, Bank Name etc')}}" name="bank_information" value="{{ $affiliate_user->bank_information }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary rounded-0">{{translate('Update Payment Settings')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,125 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-start">
|
||||
@include('frontend.inc.user_side_nav')
|
||||
<div class="aiz-user-panel">
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Affiliate') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-16 mb-2">
|
||||
<!-- Affiliate Balance -->
|
||||
<div class="col-md-6 mx-auto mb-4" >
|
||||
<div class="bg-dark text-white overflow-hidden text-center p-4 h-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="17.402" height="32" viewBox="0 0 17.402 32">
|
||||
<path id="Path_32606" data-name="Path 32606" d="M14.888-4.338a4.994,4.994,0,0,0-2.021-1.9,6.687,6.687,0,0,0-3.175-.7,5.029,5.029,0,0,0-3.258.969,3.108,3.108,0,0,0-1.2,2.536q0,2.515,3.34,3.175l3.052.577a13.933,13.933,0,0,1,2.8.825,7.913,7.913,0,0,1,2.227,1.381,5.876,5.876,0,0,1,1.485,2.082A7.211,7.211,0,0,1,18.682,7.5a6.445,6.445,0,0,1-.536,2.7,6.111,6.111,0,0,1-1.505,2.041A7.129,7.129,0,0,1,14.332,13.6a11.987,11.987,0,0,1-2.907.66v2.474a1.62,1.62,0,0,1-.371,1.093,1.334,1.334,0,0,1-1.072.433,1.334,1.334,0,0,1-1.072-.433,1.62,1.62,0,0,1-.371-1.093V14.219A9.33,9.33,0,0,1,5.61,13.5a9.09,9.09,0,0,1-2.082-1.258,6.581,6.581,0,0,1-1.34-1.464,6.227,6.227,0,0,1-.7-1.381,2.691,2.691,0,0,1-.206-.948A1.548,1.548,0,0,1,1.734,7.27a1.6,1.6,0,0,1,1.155-.433,1.3,1.3,0,0,1,.928.33,3.373,3.373,0,0,1,.639.866,13.046,13.046,0,0,0,.763,1.175A4.954,4.954,0,0,0,6.332,10.3a5.722,5.722,0,0,0,1.67.8,7.922,7.922,0,0,0,2.351.309,4.989,4.989,0,0,0,3.629-1.175,3.727,3.727,0,0,0,1.2-2.742,3.53,3.53,0,0,0-1.052-2.763,6.445,6.445,0,0,0-3.072-1.361L7.837,2.755A8.572,8.572,0,0,1,3.115.507a5.631,5.631,0,0,1-1.381-3.9A5.738,5.738,0,0,1,3.589-7.843,8.258,8.258,0,0,1,8.538-9.822v-2.433a1.45,1.45,0,0,1,.412-1.072,1.45,1.45,0,0,1,1.072-.412,1.316,1.316,0,0,1,1.031.412,1.542,1.542,0,0,1,.371,1.072v2.474a9.785,9.785,0,0,1,2.412.66,9.885,9.885,0,0,1,1.856,1.031,6.7,6.7,0,0,1,1.32,1.216,6.849,6.849,0,0,1,.8,1.216A2.018,2.018,0,0,1,18.1-4.627,1.4,1.4,0,0,1,17.692-3.6a1.5,1.5,0,0,1-1.113.412,1.5,1.5,0,0,1-.99-.309A3.423,3.423,0,0,1,14.888-4.338Z" transform="translate(-1.28 13.74)" fill="#fff"/>
|
||||
</svg>
|
||||
<div class="py-2 mt-2">
|
||||
<div class="fs-14 fw-400 text-center">{{ translate('Affiliate Balance') }}</div>
|
||||
<div class="fs-30 fw-700 text-center">{{ single_price(Auth::user()->affiliate_user->balance) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Affiliate Withdraw Request -->
|
||||
<div class="col-md-6 mx-auto mb-4">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light" onclick="show_affiliate_withdraw_modal()">
|
||||
<span class="size-60px rounded-circle mx-auto bg-dark d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-14 fw-600 text-dark">{{ translate('Affiliate Withdraw Request') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Affiliate withdraw request history -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-20 fw-700 text-dark">{{ translate('Affiliate withdraw request history')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">#</th>
|
||||
<th>{{ translate('Date') }}</th>
|
||||
<th>{{ translate('Amount')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="fs-14">
|
||||
@foreach ($affiliate_withdraw_requests as $key => $affiliate_withdraw_request)
|
||||
<tr>
|
||||
<td class="pl-0">{{ sprintf('%02d', $key+1) }}</td>
|
||||
<td>{{ date('d-m-Y', strtotime($affiliate_withdraw_request->created_at)) }}</td>
|
||||
<td class="fw-700">{{ single_price($affiliate_withdraw_request->amount) }}</td>
|
||||
<td>
|
||||
@if($affiliate_withdraw_request->status == 1)
|
||||
<span class="badge badge-inline badge-success p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{translate('Approved')}}</span>
|
||||
@elseif($affiliate_withdraw_request->status == 2)
|
||||
<span class="badge badge-inline badge-danger p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{translate('Rejected')}}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-info p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{translate('Pending')}}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $affiliate_withdraw_requests->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Affiliate Withdraw Modal -->
|
||||
<div class="modal fade" id="affiliate_withdraw_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{ translate('Affiliate Withdraw Request') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form class="" action="{{ route('affiliate.withdraw_request.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body gry-bg px-3 pt-3">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{ translate('Amount')}} <span class="text-danger">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="number" class="form-control mb-3 rounded-0" name="amount" min="1" max="{{ Auth::user()->affiliate_user->balance }}" placeholder="{{ translate('Amount')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary rounded-0 transition-3d-hover mr-1">{{translate('Confirm')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function show_affiliate_withdraw_modal(){
|
||||
$('#affiliate_withdraw_modal').modal('show');
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
236
resources/views/affiliate/index.blade.php
Normal file
236
resources/views/affiliate/index.blade.php
Normal file
@@ -0,0 +1,236 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0 h6">{{ translate('Basic Affiliate')}}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('affiliate.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="type" value="user_registration_first_purchase">
|
||||
<div class="col-lg-4">
|
||||
<label class="control-label">{{ translate('User Registration & First Purchase')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
@php
|
||||
if(\App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first() != null){
|
||||
$percentage = \App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->percentage;
|
||||
$status = \App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->status;
|
||||
}
|
||||
else {
|
||||
$percentage = null;
|
||||
}
|
||||
@endphp
|
||||
<input type="number" min="0" step="0.01" max="100" class="form-control" name="percentage" value="{{ $percentage }}" placeholder="Percentage of Order Amount" required>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<label class="control-label">%</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-4">
|
||||
<label class="control-label">{{ translate('Status')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input value="1" name="status" type="checkbox" @if ($status)
|
||||
checked
|
||||
@endif>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">{{ translate('Product Sharing Affiliate')}}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('affiliate.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="type" value="product_sharing">
|
||||
<label class="col-lg-3 col-from-label">{{ translate('Product Sharing and Purchasing')}}</label>
|
||||
<div class="col-lg-6">
|
||||
@php
|
||||
if(\App\Models\AffiliateOption::where('type', 'product_sharing')->first() != null && \App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details != null){
|
||||
$commission_product_sharing = json_decode(\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details)->commission;
|
||||
$commission_type_product_sharing = json_decode(\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details)->commission_type;
|
||||
$status = \App\Models\AffiliateOption::where('type', 'product_sharing')->first()->status;
|
||||
}
|
||||
else {
|
||||
$commission_product_sharing = null;
|
||||
$commission_type_product_sharing = null;
|
||||
}
|
||||
@endphp
|
||||
<input type="number" min="0" step="0.01" max="100" class="form-control" name="amount" value="{{ $commission_product_sharing }}" placeholder="Percentage of Order Amount" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control aiz-selectpicker" name="amount_type">
|
||||
<option value="amount" @if ($commission_type_product_sharing == "amount") selected @endif>$</option>
|
||||
<option value="percent" @if ($commission_type_product_sharing == "percent") selected @endif>%</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-4">
|
||||
<label class="control-label">{{ translate('Status')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input value="1" name="status" type="checkbox" @if ($status) checked @endif>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">{{ translate('Product Sharing Affiliate (Category Wise)')}}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('affiliate.store') }}" method="POST">
|
||||
@csrf
|
||||
@php
|
||||
if(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first() != null){
|
||||
$category_wise_affiliate_status = \App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->status;
|
||||
}
|
||||
@endphp
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-4">
|
||||
<label class="control-label">{{ translate('Status')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input value="1" name="status" type="checkbox" @if ($category_wise_affiliate_status) checked @endif>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@if (\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first() != null)
|
||||
<input type="hidden" name="type" value="category_wise_affiliate">
|
||||
@foreach (\App\Models\Category::all() as $key => $category)
|
||||
@php
|
||||
$found = false;
|
||||
@endphp
|
||||
@if(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->details != null)
|
||||
@foreach (json_decode(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->details) as $key => $data)
|
||||
@if($data->category_id == $category->id)
|
||||
@php
|
||||
$found = true;
|
||||
$value = $data;
|
||||
@endphp
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@if ($found)
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-5">
|
||||
<input type="hidden" name="categories_id_{{ $value->category_id }}" value="{{ $value->category_id }}">
|
||||
<input type="text" class="form-control" value="{{ \App\Models\Category::find($value->category_id)->name }}" readonly>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<input type="number" min="0" step="0.01" class="form-control" name="commison_amounts_{{ $value->category_id }}" value="{{ $value->commission }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control aiz-selectpicker" name="commison_types_{{ $value->category_id }}">
|
||||
<option value="amount" @if($value->commission_type == 'amount') selected @endif>$</option>
|
||||
<option value="percent" @if($value->commission_type == 'percent') selected @endif>%</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-5">
|
||||
<input type="hidden" name="categories_id_{{ $category->id }}" value="{{ $category->id }}">
|
||||
<input type="text" class="form-control" value="{{ $category->getTranslation('name') }}" readonly>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<input type="number" min="0" step="0.01" class="form-control" name="commison_amounts_{{ $category->id }}" value="0">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control aiz-selectpicker" name="commison_types_{{ $category->id }}">
|
||||
<option value="amount">$</option>
|
||||
<option value="percent">%</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card bg-gray-light">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">
|
||||
<i>{{ translate('N:B: You can not enable Single Product Sharing Affiliate and Category Wise Affiliate at a time.') }}</i>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card bg-gray-light">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">{{ translate('Affiliate Link Validatin Time (Days)')}}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('affiliate.configs.store') }}" method="POST">
|
||||
@csrf
|
||||
@php
|
||||
$validation_time_info = \App\Models\AffiliateConfig::where('type', 'validation_time')->first();
|
||||
$validation_time = '';
|
||||
if($validation_time_info) {
|
||||
$validation_time = $validation_time_info->value;
|
||||
}
|
||||
@endphp
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-4">
|
||||
<input type="hidden" class="form-control" name="type" value="validation_time">
|
||||
<label class="control-label">{{ translate('Validation Time')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" placeholder="No of Days" name="validation_time" value="{{$validation_time}}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Days</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
35
resources/views/affiliate/payment_history.blade.php
Normal file
35
resources/views/affiliate/payment_history.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Affiliate payments of ').$affiliate_user->user->name }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Date')}}</th>
|
||||
<th>{{ translate('Amount')}}</th>
|
||||
<th>{{ translate('Payment Method') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($affiliate_payments as $key => $payment)
|
||||
<tr>
|
||||
<td>{{ $key+1 }}</td>
|
||||
<td>{{ $payment->created_at }}</td>
|
||||
<td>
|
||||
{{ single_price($payment->amount) }}
|
||||
</td>
|
||||
<td>{{ ucfirst($payment->payment_method) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
55
resources/views/affiliate/payment_modal.blade.php
Normal file
55
resources/views/affiliate/payment_modal.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<form action="{{ route('affiliate_user.payment_store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{ translate('Affiliate Payment')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-bordered" >
|
||||
<tbody>
|
||||
<tr>
|
||||
@if($affiliate_user->balance >= 0)
|
||||
<td>{{ translate('Due Amount') }}</td>
|
||||
<td><strong>{{ single_price($affiliate_user->balance) }}</strong></td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ translate('Paypal Email') }}</td>
|
||||
<td>{{ $affiliate_user->paypal_email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ translate('Bank Information') }}</td>
|
||||
<td>{{ $affiliate_user->bank_information }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if ($affiliate_user->balance > 0)
|
||||
<input type="hidden" name="affiliate_user_id" value="{{ $affiliate_user->id }}">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="amount">{{ translate('Amount')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" min="0" step="0.01" name="amount" id="amount" value="{{ $affiliate_user->balance }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="payment_method">{{ translate('Payment Method')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="payment_method" id="payment_method" class="form-control aiz-selectpicker" required>
|
||||
<option value="">{{ translate('Select Payment Method')}}</option>
|
||||
<option value="Paypal">{{ translate('Paypal')}}</option>
|
||||
<option value="Bank">{{ translate('Bank')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if ($affiliate_user->balance > 0)
|
||||
<button class="btn btn-sm btn-primary" type="submit">{{ translate('Pay')}}</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-sm btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
43
resources/views/affiliate/refferal_users.blade.php
Normal file
43
resources/views/affiliate/refferal_users.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Refferal Users')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Phone')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Email Address')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Reffered By')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($refferal_users as $key => $refferal_user)
|
||||
@if ($refferal_user != null)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($refferal_users->currentPage() - 1)*$refferal_users->perPage() }}</td>
|
||||
<td>{{$refferal_user->name}}</td>
|
||||
<td>{{$refferal_user->phone}}</td>
|
||||
<td>{{$refferal_user->email}}</td>
|
||||
<td>
|
||||
@if (\App\Models\User::find($refferal_user->referred_by) != null)
|
||||
{{ \App\Models\User::find($refferal_user->referred_by)->name }} ({{ \App\Models\User::find($refferal_user->referred_by)->email }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $refferal_users->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Affiliate User Verification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body row">
|
||||
<div class="col-md-4">
|
||||
<h6 class="mb-4">{{ translate('User Info') }}</h6>
|
||||
<p class="text-muted">
|
||||
<strong>{{ translate('Name') }} :</strong>
|
||||
<span class="ml-2">{{ $affiliate_user->user->name }}</span>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<strong>{{translate('Email')}}</strong>
|
||||
<span class="ml-2">{{ $affiliate_user->user->email }}</span>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<strong>{{translate('Address')}}</strong>
|
||||
<span class="ml-2">{{ $affiliate_user->user->address }}</span>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<strong>{{translate('Phone')}}</strong>
|
||||
<span class="ml-2">{{ $affiliate_user->user->phone }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h6 class="mb-4">{{ translate('Verification Info') }}</h6>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<tbody>
|
||||
@foreach (json_decode($affiliate_user->informations) as $key => $info)
|
||||
<tr>
|
||||
<th class="text-muted">{{ $info->label }}</th>
|
||||
@if ($info->type == 'text' || $info->type == 'select' || $info->type == 'radio')
|
||||
<td>{{ $info->value }}</td>
|
||||
@elseif ($info->type == 'multi_select')
|
||||
<td>
|
||||
{{ implode(json_decode($info->value), ', ') }}
|
||||
</td>
|
||||
@elseif ($info->type == 'file')
|
||||
<td>
|
||||
<a href="{{ static_asset($info->value) }}" target="_blank" class="btn-info">{{ translate('Click here')}}</a>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
<a href="{{ route('affiliate_user.reject', $affiliate_user->id) }}" class="btn btn-sm btn-default d-innline-block">{{ translate('Reject')}}</a></li>
|
||||
<a href="{{ route('affiliate_user.approve', $affiliate_user->id) }}" class="btn btn-sm btn-dark d-innline-block">{{ translate('Accept')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
113
resources/views/affiliate/users.blade.php
Normal file
113
resources/views/affiliate/users.blade.php
Normal file
@@ -0,0 +1,113 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Affiliate Users')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Phone')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Email Address')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Verification Info')}}</th>
|
||||
<th>{{ translate('Approval')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Due Amount') }}</th>
|
||||
<th width="10%" class="text-right">{{ translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($affiliate_users as $key => $affiliate_user)
|
||||
@if($affiliate_user->user != null)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($affiliate_users->currentPage() - 1)*$affiliate_users->perPage() }}</td>
|
||||
<td>{{$affiliate_user->user->name}}</td>
|
||||
<td>{{$affiliate_user->user->phone}}</td>
|
||||
<td>{{$affiliate_user->user->email}}</td>
|
||||
<td>
|
||||
@if ($affiliate_user->informations != null)
|
||||
<a href="{{ route('affiliate_users.show_verification_request', $affiliate_user->id) }}">
|
||||
<span class="badge badge-inline badge-info">{{translate('Show')}}</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input onchange="update_approved(this)" value="{{ $affiliate_user->id }}" type="checkbox" <?php if($affiliate_user->status == 1) echo "checked";?> >
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
@if ($affiliate_user->balance >= 0)
|
||||
{{ single_price($affiliate_user->balance) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@can('pay_to_affiliate_user')
|
||||
<a href="#" class="btn btn-soft-primary btn-icon btn-circle btn-sm" onclick="show_payment_modal('{{$affiliate_user->id}}');" title="{{ translate('Pay Now') }}">
|
||||
<i class="las la-money-bill"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('affiliate_users_payment_history')
|
||||
<a class="btn btn-soft-success btn-icon btn-circle btn-sm" href="{{route('affiliate_user.payment_history', encrypt($affiliate_user->id))}}" title="{{ translate('Payment History') }}">
|
||||
<i class="las la-history"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $affiliate_users->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
|
||||
@include('modals.delete_modal')
|
||||
|
||||
<div class="modal fade" id="payment_modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function show_payment_modal(id){
|
||||
$.post('{{ route('affiliate_user.payment_modal') }}',{_token:'{{ @csrf_token() }}', id:id}, function(data){
|
||||
$('#payment_modal #modal-content').html(data);
|
||||
$('#payment_modal').modal('show', {backdrop: 'static'});
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
function update_approved(el){
|
||||
if(el.checked){
|
||||
var status = 1;
|
||||
}
|
||||
else{
|
||||
var status = 0;
|
||||
}
|
||||
$.post('{{ route('affiliate_user.approved') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Approved sellers updated successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
163
resources/views/auction/auction_product_orders.blade.php
Normal file
163
resources/views/auction/auction_product_orders.blade.php
Normal file
@@ -0,0 +1,163 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<form class="" id=" sort_orders" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col text-center text-md-left">
|
||||
<h5 class="mb-md-0 h6">{{ translate('Auction Product Orders') }}</h5>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="aiz-date-range form-control" value="{{ $date }}" name="date"
|
||||
placeholder="{{ translate('Filter by date') }}" data-format="DD-MM-Y" data-separator=" to "
|
||||
data-advanced-range="true" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 ml-auto">
|
||||
<select class="form-control aiz-selectpicker" name="payment_type" id="payment_type"
|
||||
onchange="sort_orders()">
|
||||
<option value="">{{ translate('Filter by Payment Status') }}</option>
|
||||
<option value="paid" @isset($payment_status) @if ($payment_status == 'paid') selected @endif @endisset>
|
||||
{{ translate('Paid') }}</option>
|
||||
<option value="unpaid" @isset($payment_status) @if ($payment_status == 'unpaid') selected @endif @endisset>
|
||||
{{ translate('Un-Paid') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 ml-auto">
|
||||
<select class="form-control aiz-selectpicker" name="delivery_status" id="delivery_status"
|
||||
onchange="sort_orders()">
|
||||
<option value="">{{ translate('Filter by Deliver Status') }}</option>
|
||||
<option value="pending" @isset($delivery_status) @if ($delivery_status == 'pending') selected @endif @endisset>
|
||||
{{ translate('Pending') }}</option>
|
||||
<option value="confirmed" @isset($delivery_status) @if ($delivery_status == 'confirmed') selected @endif @endisset>
|
||||
{{ translate('Confirmed') }}</option>
|
||||
<option value="on_delivery" @isset($delivery_status) @if ($delivery_status == 'on_delivery') selected @endif @endisset>
|
||||
{{ translate('On delivery') }}</option>
|
||||
<option value="delivered" @isset($delivery_status) @if ($delivery_status == 'delivered') selected @endif @endisset>
|
||||
{{ translate('Delivered') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control" id="search" name="search" @isset($sort_search)
|
||||
value="{{ $sort_search }}" @endisset
|
||||
placeholder="{{ translate('Type Order code & hit Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="form-group mb-0">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Filter') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Order Code') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Customer') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Amount') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Delivery Status') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Payment Method') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Payment Status') }}</th>
|
||||
@if (addon_is_activated('refund_request'))
|
||||
<th>{{ translate('Refund') }}</th>
|
||||
@endif
|
||||
<th class="text-right" width="15%">{{ translate('Options') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($orders as $key => $order_id)
|
||||
@php
|
||||
$order = \App\Models\Order::find($order_id->id);
|
||||
@endphp
|
||||
@if ($order != null)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $key + 1 + ($orders->currentPage() - 1) * $orders->perPage() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $order->code }}@if ($order->viewed == 0) <span class="badge badge-inline badge-info">{{ translate('New') }}</span>@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->user != null)
|
||||
{{ $order->user->name }}
|
||||
@else
|
||||
Guest ({{ $order->guest_id }})
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ single_price($order->grand_total) }}
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$status = $order->delivery_status;
|
||||
@endphp
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $status))) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $order->payment_type))) }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->payment_status == 'paid')
|
||||
<span class="badge badge-inline badge-success">{{ translate('Paid') }}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-danger">{{ translate('Unpaid') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
@if (addon_is_activated('refund_request'))
|
||||
<td>
|
||||
@if (count($order->refund_requests) > 0)
|
||||
{{ count($order->refund_requests) }} {{ translate('Refund') }}
|
||||
@else
|
||||
{{ translate('No Refund') }}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
<td class="text-right">
|
||||
@can('view_order_details')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('all_orders.show', encrypt($order->id))}}" title="{{ translate('View') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
@endcan
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm"
|
||||
href="{{ route('invoice.download', $order->id) }}"
|
||||
title="{{ translate('Download Invoice') }}">
|
||||
<i class="las la-download"></i>
|
||||
</a>
|
||||
@can('delete_order')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{ route('orders.destroy', $order->id) }}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $orders->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function sort_orders(el) {
|
||||
$('#sort_orders').submit();
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/auction/auction_products/bids.blade.php
Normal file
64
resources/views/auction/auction_products/bids.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('Bids For').$product->name}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-md-0 h6">{{ translate('All Bids') }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Customer Name')}}</th>
|
||||
<th>{{translate('Email')}}</th>
|
||||
<th>{{translate('Phone')}}</th>
|
||||
<th>{{translate('Bid Amount')}}</th>
|
||||
<th>{{translate('Date')}}</th>
|
||||
<th data-breakpoints="sm" class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bids as $key => $bid)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($bids->currentPage() - 1)*$bids->perPage() }}</td>
|
||||
<td>{{ $bid->user->name ?? translate('User Deleted') }}</td>
|
||||
<td>{{ $bid->user->email ?? '' }}</td>
|
||||
<td>{{ $bid->user->phone ?? '' }}</td>
|
||||
<td>{{ single_price($bid->amount) }}</td>
|
||||
<td>{{ date('d-m-Y', strtotime($bid->created_at)) }}</td>
|
||||
<td class="text-right">
|
||||
@can('delete_auction_product_bids')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('product_bids_destroy.admin', $bid->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $bids->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
388
resources/views/auction/auction_products/create.blade.php
Normal file
388
resources/views/auction/auction_products/create.blade.php
Normal file
@@ -0,0 +1,388 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h5 class="mb-0 h6">{{translate('Add New Auction Product')}}</h5>
|
||||
</div>
|
||||
<div class="">
|
||||
<form class="form form-horizontal mar-top" action="{{route('auction_product_store.admin')}}" method="POST" enctype="multipart/form-data" id="choice_form">
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-8">
|
||||
@csrf
|
||||
<input type="hidden" name="added_by" value="admin">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Product Name')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="name" placeholder="{{ translate('Product Name') }}" onchange="update_sku()" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-md-3 col-from-label">{{translate('Category')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="category_id" id="category_id" data-live-search="true" required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="brand">
|
||||
<label class="col-md-3 col-from-label">{{translate('Brand')}}</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="brand_id" id="brand_id" data-live-search="true">
|
||||
<option value="">{{ translate('Select Brand') }}</option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}">{{ $brand->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Unit')}}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="unit" placeholder="{{ translate('Unit (e.g. KG, Pc etc)') }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Tags')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control aiz-tag-input" name="tags[]" placeholder="{{ translate('Type and hit enter to add a tag') }}">
|
||||
<small class="text-muted">{{translate('This is used for search. Input those words by which cutomer can find this product.')}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Images')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Gallery Images')}} <small>(600x600)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
<small class="text-muted">{{translate('These images are visible in product details page gallery. Use 600x600 sizes images.')}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Thumbnail Image')}} <small>(300x300)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
<small class="text-muted">{{translate('This image is visible in all product box. Use 300x300 sizes image. Keep some blank space around main object of your image as we had to crop some edge in different devices to make it responsive.')}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Videos')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Video Provider')}}</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="video_provider" id="video_provider">
|
||||
<option value="youtube">{{translate('Youtube')}}</option>
|
||||
<option value="dailymotion">{{translate('Dailymotion')}}</option>
|
||||
<option value="vimeo">{{translate('Vimeo')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Video Link')}}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="video_link" placeholder="{{ translate('Video Link') }}">
|
||||
<small class="text-muted">{{translate("Use proper link without extra parameter. Don't use short share link/embeded iframe code.")}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Bidding Price + Date Range')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Starting Bidding Price')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01" placeholder="{{ translate('Starting bidding price') }}" name="starting_bid" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label" for="start_date">{{translate('Auction Date Range')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" name="auction_date_range" placeholder="{{translate('Select Date')}}" data-time-picker="true" data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Description')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="aiz-text-editor" name="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('PDF Specification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('PDF Specification')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="document">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('SEO Meta Tags')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="meta_title" placeholder="{{ translate('Meta Title') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea name="meta_description" rows="8" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{ translate('Meta Image') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">
|
||||
{{translate('Shipping Configuration')}}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (get_setting('shipping_type') == 'product_wise_shipping')
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Free Shipping')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="free" checked>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Flat Rate')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="flat_rate">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flat_rate_shipping_div" style="display: none">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Shipping cost')}}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01" placeholder="{{ translate('Shipping cost') }}" name="flat_shipping_cost" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Is Product Quantity Mulitiply')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="is_quantity_multiplied" value="1">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Product wise shipping cost is disable. Shipping cost is configured from here') }}
|
||||
<a href="{{route('shipping_configuration.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Shipping Configuration')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Cash On Delivery')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (get_setting('cash_payment') == '1')
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Status')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="cash_on_delivery" value="1" checked="">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Cash On Delivery option is disabled. Activate this feature from here') }}
|
||||
<a href="{{route('activation.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Cash Payment Activation')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Estimate Shipping Time')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">
|
||||
{{translate('Shipping Days')}}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="est_shipping_days" min="1" step="1" placeholder="{{translate('Shipping Days')}}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">{{translate('Days')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('VAT & Tax')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach(\App\Models\Tax::where('tax_status', 1)->get() as $tax)
|
||||
<label for="name">
|
||||
{{$tax->name}}
|
||||
<input type="hidden" value="{{$tax->id}}" name="tax_id[]">
|
||||
</label>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01" placeholder="{{ translate('Tax') }}" name="tax[]" class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<select class="form-control aiz-selectpicker" name="tax_type[]">
|
||||
<option value="amount">{{translate('Flat')}}</option>
|
||||
<option value="percent">{{translate('Percent')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="btn-toolbar float-right mb-3" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="submit" name="button" value="draft" class="btn btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
$('form').bind('submit', function (e) {
|
||||
// Disable the submit button while evaluating if the form should be submitted
|
||||
$("button[type='submit']").prop('disabled', true);
|
||||
|
||||
var valid = true;
|
||||
|
||||
if (!valid) {
|
||||
e.preventDefault();
|
||||
|
||||
// Reactivate the button if the form was not submitted
|
||||
$("button[type='submit']").button.prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$("[name=shipping_type]").on("change", function (){
|
||||
$(".flat_rate_shipping_div").hide();
|
||||
|
||||
if($(this).val() == 'flat_rate'){
|
||||
$(".flat_rate_shipping_div").show();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
424
resources/views/auction/auction_products/edit.blade.php
Normal file
424
resources/views/auction/auction_products/edit.blade.php
Normal file
@@ -0,0 +1,424 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h1 class="mb-0 h6">{{ translate('Edit Auction Product') }}</h5>
|
||||
</div>
|
||||
<div class="">
|
||||
<form class="form form-horizontal mar-top" action="{{route('auction_product_update.admin', $product->id)}}" method="POST" enctype="multipart/form-data">
|
||||
<input name="_method" type="hidden" value="POST">
|
||||
<input type="hidden" name="id" value="{{ $product->id }}">
|
||||
<input type="hidden" name="lang" value="{{ $lang }}">
|
||||
@csrf
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-8">
|
||||
|
||||
<div class="card">
|
||||
<ul class="nav nav-tabs nav-fill border-light">
|
||||
@foreach (\App\Models\Language::all() as $key => $language)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-reset @if ($language->code == $lang) active @else bg-soft-dark border-light border-left-0 @endif py-3" href="{{ route('auction_product_edit.admin', ['id'=>$product->id, 'lang'=> $language->code] ) }}">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" height="11" class="mr-1">
|
||||
<span>{{$language->name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Product Name')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="name" placeholder="{{translate('Product Name')}}" value="{{ $product->getTranslation('name', $lang) }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Category')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="category_id" id="category_id" data-selected="{{ $product->category_id }}" data-live-search="true" required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="brand">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Brand')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="brand_id" id="brand_id" data-live-search="true">
|
||||
<option value="">{{ translate('Select Brand') }}</option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}" @if($product->brand_id == $brand->id) selected @endif>{{ $brand->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Unit')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i> </label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="unit" placeholder="{{ translate('Unit (e.g. KG, Pc etc)') }}" value="{{$product->getTranslation('unit', $lang)}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Tags')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control aiz-tag-input" name="tags[]" id="tags" value="{{ $product->tags }}" placeholder="{{ translate('Type to add a tag') }}" data-role="tagsinput">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Images')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Gallery Images')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" value="{{ $product->photos }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Thumbnail Image')}} <small>(290x300)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" value="{{ $product->thumbnail_img }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Videos')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Video Provider')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="video_provider" id="video_provider">
|
||||
<option value="youtube" <?php if ($product->video_provider == 'youtube') echo "selected"; ?> >{{translate('Youtube')}}</option>
|
||||
<option value="dailymotion" <?php if ($product->video_provider == 'dailymotion') echo "selected"; ?> >{{translate('Dailymotion')}}</option>
|
||||
<option value="vimeo" <?php if ($product->video_provider == 'vimeo') echo "selected"; ?> >{{translate('Vimeo')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Video Link')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="video_link" value="{{ $product->video_link }}" placeholder="{{ translate('Video Link') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Bidding Price + Date Range')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Starting Bidding Price')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" placeholder="{{translate('Starting Bidding Price')}}" name="starting_bid" class="form-control" value="{{$product->starting_bid}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$start_date = date('d-m-Y H:i:s', $product->auction_start_date);
|
||||
$end_date = date('d-m-Y H:i:s', $product->auction_end_date);
|
||||
@endphp
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="start_date">{{translate('Auction Date Range')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" value="{{ $start_date.' to '.$end_date }}" name="auction_date_range" placeholder="{{translate('Select Date')}}" data-time-picker="true" data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Description')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Description')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-lg-9">
|
||||
<textarea class="aiz-text-editor" name="description">{{ $product->getTranslation('description', $lang) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('PDF Specification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('PDF Specification')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" value="{{ $product->pdf }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('SEO Meta Tags')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="meta_title" value="{{ $product->meta_title }}" placeholder="{{translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="meta_description" rows="8" class="form-control">{{ $product->meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Meta Images')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" value="{{ $product->meta_img }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Slug')}}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" placeholder="{{translate('Slug')}}" id="slug" name="slug" value="{{ $product->slug }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6" class="dropdown-toggle" data-toggle="collapse" data-target="#collapse_2">
|
||||
{{translate('Shipping Configuration')}}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body collapse show" id="collapse_2">
|
||||
@if (get_setting('shipping_type') == 'product_wise_shipping')
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Free Shipping')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="free" @if($product->shipping_type == 'free') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Flat Rate')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="flat_rate" @if($product->shipping_type == 'flat_rate') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flat_rate_shipping_div" style="display: none">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Shipping cost')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="number" lang="en" min="0" value="{{ $product->shipping_cost }}" step="0.01" placeholder="{{ translate('Shipping cost') }}" name="flat_shipping_cost" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Is Product Quantity Mulitiply')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="is_quantity_multiplied" value="1" @if($product->is_quantity_multiplied == 1) checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Product wise shipping cost is disable. Shipping cost is configured from here') }}
|
||||
<a href="{{route('shipping_configuration.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Shipping Configuration')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Cash On Delivery')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (get_setting('cash_payment') == '1')
|
||||
<div class="form-group row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Status')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="cash_on_delivery" value="1" @if($product->cash_on_delivery == 1) checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Cash On Delivery option is disabled. Activate this feature from here') }}
|
||||
<a href="{{route('activation.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Cash Payment Activation')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Estimate Shipping Time')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">
|
||||
{{translate('Shipping Days')}}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="est_shipping_days" value="{{ $product->est_shipping_days }}" min="1" step="1" placeholder="{{translate('Shipping Days')}}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">{{translate('Days')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('VAT & Tax')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach(\App\Models\Tax::where('tax_status', 1)->get() as $tax)
|
||||
<label for="name">
|
||||
{{$tax->name}}
|
||||
<input type="hidden" value="{{$tax->id}}" name="tax_id[]">
|
||||
</label>
|
||||
|
||||
@php
|
||||
$tax_amount = 0;
|
||||
$tax_type = '';
|
||||
foreach($tax->product_taxes as $row) {
|
||||
if($product->id == $row->product_id) {
|
||||
$tax_amount = $row->tax;
|
||||
$tax_type = $row->tax_type;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<input type="number" lang="en" min="0" value="{{ $tax_amount }}" step="0.01" placeholder="{{ translate('Tax') }}" name="tax[]" class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<select class="form-control aiz-selectpicker" name="tax_type[]">
|
||||
<option value="amount" @if($tax_type == 'amount') selected @endif>
|
||||
{{translate('Flat')}}
|
||||
</option>
|
||||
<option value="percent" @if($tax_type == 'percent') selected @endif>
|
||||
{{translate('Percent')}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="mb-3 text-right">
|
||||
<button type="submit" name="button" class="btn btn-info">{{ translate('Update Product') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function (){
|
||||
show_hide_shipping_div();
|
||||
});
|
||||
|
||||
$("[name=shipping_type]").on("change", function (){
|
||||
show_hide_shipping_div();
|
||||
});
|
||||
|
||||
function show_hide_shipping_div() {
|
||||
var shipping_val = $("[name=shipping_type]:checked").val();
|
||||
|
||||
$(".flat_rate_shipping_div").hide();
|
||||
|
||||
if(shipping_val == 'flat_rate'){
|
||||
$(".flat_rate_shipping_div").show();
|
||||
}
|
||||
}
|
||||
|
||||
AIZ.plugins.tagify();
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.remove-files').on('click', function(){
|
||||
$(this).parents(".col-md-4").remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
172
resources/views/auction/auction_products/index.blade.php
Normal file
172
resources/views/auction/auction_products/index.blade.php
Normal file
@@ -0,0 +1,172 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('Auction products')}}</h1>
|
||||
</div>
|
||||
@can('add_auction_product')
|
||||
<div class="col text-right">
|
||||
<a href="{{ route('auction_product_create.admin') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Add New Auction Product')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="card">
|
||||
<form class="" id="sort_products" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-md-0 h6">{{ translate('Auction Product') }}</h5>
|
||||
</div>
|
||||
|
||||
@if($type == 'seller')
|
||||
<div class="col-md-2 ml-auto">
|
||||
<select class="form-control form-control-sm aiz-selectpicker mb-2 mb-md-0" id="user_id" name="user_id" onchange="sort_products()">
|
||||
<option value="">{{ translate('All Sellers') }}</option>
|
||||
@foreach (App\Models\Seller::all() as $key => $seller)
|
||||
@if ($seller->user != null && $seller->user->shop != null)
|
||||
<option value="{{ $seller->user->id }}" @if ($seller->user->id == $seller_id) selected @endif>{{ $seller->user->shop->name }} ({{ $seller->user->name }})</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
@if($type == 'all')
|
||||
<div class="col-md-2 ml-auto">
|
||||
<select class="form-control form-control-sm aiz-selectpicker mb-2 mb-md-0" id="user_id" name="user_id" onchange="sort_products()">
|
||||
<option value="">{{ translate('All Sellers') }}</option>
|
||||
@foreach (App\Models\User::where('user_type', '=', 'admin')->orWhere('user_type', '=', 'seller')->get() as $key => $seller)
|
||||
<option value="{{ $seller->id }}" @if ($seller->id == $seller_id) selected @endif>{{ $seller->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-2">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control form-control-sm" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
@if($type == 'all' || $type == 'seller')
|
||||
<th data-breakpoints="sm">{{translate('Added By')}}</th>
|
||||
@endif
|
||||
<th data-breakpoints="sm">{{translate('Bid Starting Amount')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Auction Start Date')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Auction End Date')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Total Bids')}}</th>
|
||||
@if(get_setting('product_approve_by_admin') == 1 && $type == 'seller')
|
||||
<th data-breakpoints="lg">{{translate('Approved')}}</th>
|
||||
@endif
|
||||
<th data-breakpoints="sm" class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($products as $key => $product)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($products->currentPage() - 1)*$products->perPage() }}</td>
|
||||
<td>
|
||||
<div class="row gutters-5 w-200px w-md-300px mw-100">
|
||||
<div class="col-auto">
|
||||
<img src="{{ uploaded_asset($product->thumbnail_img)}}" alt="Image" class="size-50px img-fit">
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="text-muted text-truncate-2">{{ $product->getTranslation('name') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@if($type == 'seller' || $type == 'all')
|
||||
<td>{{ $product->user->name }}</td>
|
||||
@endif
|
||||
<td>{{ single_price($product->starting_bid) }}</td>
|
||||
<td>{{ date('Y-m-d H:i:s', $product->auction_start_date) }}</td>
|
||||
<td>{{ date('Y-m-d H:i:s', $product->auction_end_date) }}</td>
|
||||
<td>{{ $product->bids->count() }}</td>
|
||||
@if(get_setting('product_approve_by_admin') == 1 && $type == 'seller')
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input onchange="update_approved(this)" value="{{ $product->id }}" type="checkbox" <?php if ($product->approved == 1) echo "checked"; ?> >
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
@endif
|
||||
<td class="text-right">
|
||||
@if($product->auction_start_date > strtotime("now") && auth()->user()->can('edit_auction_product'))
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('auction_product_edit.admin', ['id'=>$product->id, 'lang'=>env('DEFAULT_LANGUAGE')] )}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a class="btn btn-soft-success btn-icon btn-circle btn-sm" href="{{ route('auction-product', $product->slug) }}" target="_blank" title="{{ translate('View Products') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
@can('view_auction_product_bids')
|
||||
<a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="{{ route('product_bids.admin', $product->id) }}" target="_blank" title="{{ translate('View All Bids') }}">
|
||||
<i class="las la-gavel"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_auction_product')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('auction_product_destroy.admin', $product->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function sort_products(el){
|
||||
$('#sort_products').submit();
|
||||
}
|
||||
|
||||
function update_approved(el){
|
||||
if(el.checked){
|
||||
var approved = 1;
|
||||
}
|
||||
else{
|
||||
var approved = 0;
|
||||
}
|
||||
$.post('{{ route('products.approved') }}', {
|
||||
_token : '{{ csrf_token() }}',
|
||||
id : el.value,
|
||||
approved : approved
|
||||
}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Product approval update successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
97
resources/views/auction/frontend/addToCartAuction.blade.php
Normal file
97
resources/views/auction/frontend/addToCartAuction.blade.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<div class="modal-body p-4 c-scrollbar-light">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="row gutters-10 flex-row-reverse">
|
||||
@php
|
||||
$photos = explode(',',$product->photos);
|
||||
@endphp
|
||||
<div class="col">
|
||||
<div class="aiz-carousel product-gallery" data-nav-for='.product-gallery-thumb' data-fade='true' data-auto-height='true'>
|
||||
@foreach ($photos as $key => $photo)
|
||||
<div class="carousel-box img-zoom rounded">
|
||||
<img class="img-fluid lazyload"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($photo) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endforeach
|
||||
@foreach ($product->stocks as $key => $stock)
|
||||
@if ($stock->image != null)
|
||||
<div class="carousel-box img-zoom rounded">
|
||||
<img class="img-fluid lazyload"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($stock->image) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto w-90px">
|
||||
<div class="aiz-carousel carousel-thumb product-gallery-thumb" data-items='5' data-nav-for='.product-gallery' data-vertical='true' data-focus-select='true'>
|
||||
@foreach ($photos as $key => $photo)
|
||||
<div class="carousel-box c-pointer border p-1 rounded">
|
||||
<img class="lazyload mw-100 size-60px mx-auto"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($photo) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endforeach
|
||||
@foreach ($product->stocks as $key => $stock)
|
||||
@if ($stock->image != null)
|
||||
<div class="carousel-box c-pointer border p-1 rounded" data-variation="{{ $stock->variant }}">
|
||||
<img class="lazyload mw-100 size-50px mx-auto"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($stock->image) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="text-left">
|
||||
<h2 class="mb-2 fs-20 fw-600">
|
||||
{{ $product->getTranslation('name') }}
|
||||
</h2>
|
||||
<div class="row no-gutters mt-3">
|
||||
<div class="col-2">
|
||||
<div class="opacity-50 mt-2">{{ translate('Price')}}:</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="">
|
||||
<strong class="h2 fw-600 text-primary">
|
||||
{{ single_price($product->bids->max('amount')) }}
|
||||
</strong>
|
||||
<span class="opacity-70">/{{ $product->unit }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@php
|
||||
$qty = 0;
|
||||
foreach ($product->stocks as $key => $stock) {
|
||||
$qty += $stock->qty;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<form id="option-choice-form">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{ $product->id }}">
|
||||
<input type="hidden" name="quantity" value="1" >
|
||||
</form>
|
||||
<div class="mt-3">
|
||||
<button type="button" class="btn btn-primary buy-now fw-600 add-to-cart" onclick="addToCart()">
|
||||
<i class="la la-shopping-cart"></i>
|
||||
<span class="d-none d-md-inline-block"> {{ translate('Add to cart')}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
100
resources/views/auction/frontend/all_auction_products.blade.php
Normal file
100
resources/views/auction/frontend/all_auction_products.blade.php
Normal file
@@ -0,0 +1,100 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@if (isset($category_id))
|
||||
@php
|
||||
$meta_title = \App\Models\Category::find($category_id)->meta_title;
|
||||
$meta_description = \App\Models\Category::find($category_id)->meta_description;
|
||||
@endphp
|
||||
@elseif (isset($brand_id))
|
||||
@php
|
||||
$meta_title = \App\Models\Brand::find($brand_id)->meta_title;
|
||||
$meta_description = \App\Models\Brand::find($brand_id)->meta_description;
|
||||
@endphp
|
||||
@else
|
||||
@php
|
||||
$meta_title = get_setting('meta_title');
|
||||
$meta_description = get_setting('meta_description');
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@section('meta_title'){{ $meta_title }}@stop
|
||||
@section('meta_description'){{ $meta_description }}@stop
|
||||
|
||||
@section('meta')
|
||||
<!-- Schema.org markup for Google+ -->
|
||||
<meta itemprop="name" content="{{ $meta_title }}">
|
||||
<meta itemprop="description" content="{{ $meta_description }}">
|
||||
|
||||
<!-- Twitter Card data -->
|
||||
<meta name="twitter:title" content="{{ $meta_title }}">
|
||||
<meta name="twitter:description" content="{{ $meta_description }}">
|
||||
|
||||
<!-- Open Graph data -->
|
||||
<meta property="og:title" content="{{ $meta_title }}" />
|
||||
<meta property="og:description" content="{{ $meta_description }}" />
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- Breadcrumb -->
|
||||
<section class="mb-4 pt-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-lg-left text-center">
|
||||
<h1 class="fw-700 fs-20 fs-md-24 text-dark">{{ translate('All Auction Products') }}</h1>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ul class="breadcrumb justify-content-center justify-content-lg-end bg-transparent p-0">
|
||||
<li class="breadcrumb-item has-transition opacity-60 hov-opacity-80">
|
||||
<a class="text-reset" href="{{ route('home') }}">{{ translate('Home') }}</a>
|
||||
</li>
|
||||
<li class="text-dark fw-600 breadcrumb-item">
|
||||
<span class="text-dark">{{ translate('All Auction Products') }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- All Auction Products -->
|
||||
<section class="mb-4 pt-3">
|
||||
<div class="container">
|
||||
<div class="bg-white px-3 pt-3">
|
||||
<div class="row gutters-16 row-cols-xxl-5 row-cols-lg-4 row-cols-md-3 row-cols-2 border-top border-left">
|
||||
@foreach ($products as $key => $product)
|
||||
<div class="col text-center border-right border-bottom hov-scale-img has-transition hov-shadow-out z-1">
|
||||
<div class="position-relative">
|
||||
<a href="{{ route('auction-product', $product->slug) }}" class="d-block p-3">
|
||||
<img class="lazyload h-sm-120px h-md-210px img-fit mx-auto has-transition"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($product->thumbnail_img) }}"
|
||||
alt="{{ $product->getTranslation('name') }}" title="{{ $product->getTranslation('name') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</a>
|
||||
</div>
|
||||
<div class="p-md-3 p-2 text-center">
|
||||
<h3 class="fw-400 fs-14 text-truncate-2 lh-1-4 mb-0 h-35px mb-2">
|
||||
<a href="{{ route('auction-product', $product->slug) }}" class="d-block text-reset hov-text-primary"
|
||||
title="{{ $product->getTranslation('name') }}">{{ $product->getTranslation('name') }}</a>
|
||||
</h3>
|
||||
<div class="fs-14">
|
||||
<span class="fw-700 text-primary">{{ single_price($product->starting_bid) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="aiz-pagination aiz-pagination-center mt-4">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,574 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('meta_title'){{ $detailedProduct->meta_title }}@stop
|
||||
|
||||
@section('meta_description'){{ $detailedProduct->meta_description }}@stop
|
||||
|
||||
@section('meta_keywords'){{ $detailedProduct->tags }}@stop
|
||||
|
||||
@section('meta')
|
||||
<!-- Schema.org markup for Google+ -->
|
||||
<meta itemprop="name" content="{{ $detailedProduct->meta_title }}">
|
||||
<meta itemprop="description" content="{{ $detailedProduct->meta_description }}">
|
||||
<meta itemprop="image" content="{{ uploaded_asset($detailedProduct->meta_img) }}">
|
||||
|
||||
<!-- Twitter Card data -->
|
||||
<meta name="twitter:card" content="product">
|
||||
<meta name="twitter:site" content="@publisher_handle">
|
||||
<meta name="twitter:title" content="{{ $detailedProduct->meta_title }}">
|
||||
<meta name="twitter:description" content="{{ $detailedProduct->meta_description }}">
|
||||
<meta name="twitter:creator" content="@author_handle">
|
||||
<meta name="twitter:image" content="{{ uploaded_asset($detailedProduct->meta_img) }}">
|
||||
<meta name="twitter:data1" content="{{ single_price($detailedProduct->unit_price) }}">
|
||||
<meta name="twitter:label1" content="Price">
|
||||
|
||||
<!-- Open Graph data -->
|
||||
<meta property="og:title" content="{{ $detailedProduct->meta_title }}" />
|
||||
<meta property="og:type" content="og:product" />
|
||||
<meta property="og:url" content="{{ route('product', $detailedProduct->slug) }}" />
|
||||
<meta property="og:image" content="{{ uploaded_asset($detailedProduct->meta_img) }}" />
|
||||
<meta property="og:description" content="{{ $detailedProduct->meta_description }}" />
|
||||
<meta property="og:site_name" content="{{ get_setting('meta_title') }}" />
|
||||
<meta property="og:price:amount" content="{{ single_price($detailedProduct->unit_price) }}" />
|
||||
<meta property="product:price:currency" content="{{ \App\Models\Currency::findOrFail(get_setting('system_default_currency'))->code }}" />
|
||||
<meta property="fb:app_id" content="{{ env('FACEBOOK_PIXEL_ID') }}">
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<section class="mb-4 pt-3">
|
||||
<div class="container">
|
||||
<div class="bg-white shadow-sm rounded p-3">
|
||||
<div class="row">
|
||||
<div class="col-xl-5 col-lg-6 mb-4">
|
||||
<div class="sticky-top z-3 row gutters-10">
|
||||
@php
|
||||
$photos = explode(',', $detailedProduct->photos);
|
||||
@endphp
|
||||
<div class="col order-1 order-md-2">
|
||||
<div class="aiz-carousel product-gallery" data-nav-for='.product-gallery-thumb' data-fade='true' data-auto-height='true'>
|
||||
@foreach ($photos as $key => $photo)
|
||||
<div class="carousel-box img-zoom rounded">
|
||||
<img class="img-fluid lazyload"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($photo) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endforeach
|
||||
@foreach ($detailedProduct->stocks as $key => $stock)
|
||||
@if ($stock->image != null)
|
||||
<div class="carousel-box img-zoom rounded">
|
||||
<img class="img-fluid lazyload"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($stock->image) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto w-md-80px order-2 order-md-1 mt-3 mt-md-0">
|
||||
<div class="aiz-carousel product-gallery-thumb" data-items='5' data-nav-for='.product-gallery' data-vertical='true' data-vertical-sm='false' data-focus-select='true' data-arrows='true'>
|
||||
@foreach ($photos as $key => $photo)
|
||||
<div class="carousel-box c-pointer border p-1 rounded">
|
||||
<img class="lazyload mw-100 size-50px mx-auto"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($photo) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endforeach
|
||||
@foreach ($detailedProduct->stocks as $key => $stock)
|
||||
@if ($stock->image != null)
|
||||
<div class="carousel-box c-pointer border p-1 rounded" data-variation="{{ $stock->variant }}">
|
||||
<img class="lazyload mw-100 size-50px mx-auto"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($stock->image) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-7 col-lg-6">
|
||||
<div class="text-left">
|
||||
<h1 class="mb-2 fs-20 fw-600">
|
||||
{{ $detailedProduct->getTranslation('name') }}
|
||||
</h1>
|
||||
|
||||
<div class="row align-items-center">
|
||||
@if ($detailedProduct->est_shipping_days)
|
||||
<div class="col-auto ml">
|
||||
<small class="mr-2 opacity-50">{{ translate('Estimate Shipping Time')}}: </small>{{ $detailedProduct->est_shipping_days }} {{ translate('Days') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<small class="mr-2 opacity-50">{{ translate('Sold by')}}: </small><br>
|
||||
@if ($detailedProduct->added_by == 'seller' && get_setting('vendor_system_activation') == 1)
|
||||
<a href="{{ route('shop.visit', $detailedProduct->user->shop->slug) }}" class="text-reset">{{ $detailedProduct->user->shop->name }}</a>
|
||||
@else
|
||||
{{ translate('Inhouse product') }}
|
||||
@endif
|
||||
</div>
|
||||
@if (get_setting('conversation_system') == 1)
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-sm btn-soft-primary" onclick="show_chat_modal()">{{ translate('Message Seller')}}</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($detailedProduct->brand != null)
|
||||
<div class="col-auto">
|
||||
<a href="{{ route('products.brand',$detailedProduct->brand->slug) }}">
|
||||
<img src="{{ uploaded_asset($detailedProduct->brand->logo) }}" alt="{{ $detailedProduct->brand->getTranslation('name') }}" height="30">
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="row no-gutters mt-3">
|
||||
<div class="col-sm-2">
|
||||
<div class="opacity-50 my-2">{{ translate('Auction Will End')}}:</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
@if($detailedProduct->auction_end_date > strtotime("now"))
|
||||
<div class="aiz-count-down align-items-center" data-date="{{ date('Y/m/d H:i:s', $detailedProduct->auction_end_date) }}"></div>
|
||||
@else
|
||||
<p>Ended</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row no-gutters mt-3">
|
||||
<div class="col-sm-2">
|
||||
<div class="opacity-50 my-2">{{ translate('Starting Bid')}}:</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<span class="opacity-50 fs-20">
|
||||
{{ single_price($detailedProduct->starting_bid) }}
|
||||
</span>
|
||||
@if($detailedProduct->unit != null)
|
||||
<span class="opacity-70">/{{ $detailedProduct->getTranslation('unit') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@if(Auth::check() && Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first() != null)
|
||||
<div class="row no-gutters">
|
||||
<div class="col-sm-2">
|
||||
<div class="opacity-50">{{ translate('My Bidded Amount')}}:</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<span class="opacity-50 fs-20">
|
||||
{{ single_price(Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first()->amount) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@php $highest_bid = $detailedProduct->bids->max('amount'); @endphp
|
||||
<div class="row no-gutters my-2">
|
||||
<div class="col-sm-2">
|
||||
<div class="opacity-50">{{ translate('Highest Bid')}}:</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<strong class="h3 fw-600 text-primary">
|
||||
@if($highest_bid != null)
|
||||
{{ single_price($highest_bid) }}
|
||||
@endif
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@php $min_bid_amount = $highest_bid != null ? $highest_bid+1 : $detailedProduct->starting_bid; @endphp
|
||||
@if($detailedProduct->auction_end_date >= strtotime("now"))
|
||||
<div class="mt-3">
|
||||
@if(Auth::check() && $detailedProduct->user_id == Auth::user()->id)
|
||||
<span class="badge badge-inline badge-danger">{{ translate('Seller Can Not Place Bid to His Own Product') }}</span>
|
||||
@else
|
||||
<button type="button" class="btn btn-primary buy-now fw-600" onclick="bid_modal()">
|
||||
<i class="las la-gavel"></i>
|
||||
@if(Auth::check() && Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first() != null)
|
||||
{{ translate('Change Bid')}}
|
||||
@else
|
||||
{{ translate('Place Bid')}}
|
||||
@endif
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row no-gutters mt-4">
|
||||
<div class="col-sm-2">
|
||||
<div class="opacity-50 my-2">{{ translate('Share')}}:</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="aiz-share"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="mb-4">
|
||||
<div class="container">
|
||||
<div class="row gutters-10">
|
||||
<div class="col-xl-12 order-0 order-xl-1">
|
||||
<div class="bg-white mb-3 shadow-sm rounded">
|
||||
<div class="nav border-bottom aiz-nav-tabs">
|
||||
<a href="#tab_default_1" data-toggle="tab" class="p-3 fs-16 fw-600 text-reset active show">{{ translate('Description')}}</a>
|
||||
@if($detailedProduct->video_link != null)
|
||||
<a href="#tab_default_2" data-toggle="tab" class="p-3 fs-16 fw-600 text-reset">{{ translate('Video')}}</a>
|
||||
@endif
|
||||
@if($detailedProduct->pdf != null)
|
||||
<a href="#tab_default_3" data-toggle="tab" class="p-3 fs-16 fw-600 text-reset">{{ translate('Downloads')}}</a>
|
||||
@endif
|
||||
@if($detailedProduct->auction_product == 0)
|
||||
<a href="#tab_default_4" data-toggle="tab" class="p-3 fs-16 fw-600 text-reset">{{ translate('Reviews')}}</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="tab-content pt-0">
|
||||
<div class="tab-pane fade active show" id="tab_default_1">
|
||||
<div class="p-4">
|
||||
<div class="mw-100 overflow-hidden text-left aiz-editor-data">
|
||||
<?php echo $detailedProduct->getTranslation('description'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tab_default_2">
|
||||
<div class="p-4">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
@if ($detailedProduct->video_provider == 'youtube' && isset(explode('=', $detailedProduct->video_link)[1]))
|
||||
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/{{ explode('=', $detailedProduct->video_link)[1] }}"></iframe>
|
||||
@elseif ($detailedProduct->video_provider == 'dailymotion' && isset(explode('video/', $detailedProduct->video_link)[1]))
|
||||
<iframe class="embed-responsive-item" src="https://www.dailymotion.com/embed/video/{{ explode('video/', $detailedProduct->video_link)[1] }}"></iframe>
|
||||
@elseif ($detailedProduct->video_provider == 'vimeo' && isset(explode('vimeo.com/', $detailedProduct->video_link)[1]))
|
||||
<iframe src="https://player.vimeo.com/video/{{ explode('vimeo.com/', $detailedProduct->video_link)[1] }}" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab_default_3">
|
||||
<div class="p-4 text-center ">
|
||||
<a href="{{ uploaded_asset($detailedProduct->pdf) }}" class="btn btn-primary">{{ translate('Download') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab_default_4">
|
||||
<div class="p-4">
|
||||
<ul class="list-group list-group-flush">
|
||||
@foreach ($detailedProduct->reviews as $key => $review)
|
||||
@if($review->user != null)
|
||||
<li class="media list-group-item d-flex">
|
||||
<span class="avatar avatar-md mr-3">
|
||||
<img class="lazyload"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';"
|
||||
@if($review->user->avatar_original !=null)
|
||||
data-src="{{ uploaded_asset($review->user->avatar_original) }}"
|
||||
@else
|
||||
data-src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
@endif
|
||||
>
|
||||
</span>
|
||||
<div class="media-body text-left">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h3 class="fs-15 fw-600 mb-0">{{ $review->user->name }}</h3>
|
||||
<span class="rating rating-sm">
|
||||
@for ($i=0; $i < $review->rating; $i++)
|
||||
<i class="las la-star active"></i>
|
||||
@endfor
|
||||
@for ($i=0; $i < 5-$review->rating; $i++)
|
||||
<i class="las la-star"></i>
|
||||
@endfor
|
||||
</span>
|
||||
</div>
|
||||
<div class="opacity-60 mb-2">{{ date('d-m-Y', strtotime($review->created_at)) }}</div>
|
||||
<p class="comment-text">
|
||||
{{ $review->comment }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@if(count($detailedProduct->reviews) <= 0)
|
||||
<div class="text-center fs-18 opacity-70">
|
||||
{{ translate('There have been no reviews for this product yet.') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(Auth::check())
|
||||
@php
|
||||
$commentable = false;
|
||||
@endphp
|
||||
@foreach ($detailedProduct->orderDetails as $key => $orderDetail)
|
||||
@if($orderDetail->order != null && $orderDetail->order->user_id == Auth::user()->id &&
|
||||
$orderDetail->delivery_status == 'delivered' &&
|
||||
\App\Models\Review::where('user_id', Auth::user()->id)->where('product_id', $detailedProduct->id)->first() == null)
|
||||
@php
|
||||
$commentable = true;
|
||||
@endphp
|
||||
@endif
|
||||
@endforeach
|
||||
@if ($commentable)
|
||||
<div class="pt-4">
|
||||
<div class="border-bottom mb-4">
|
||||
<h3 class="fs-17 fw-600">
|
||||
{{ translate('Write a review')}}
|
||||
</h3>
|
||||
</div>
|
||||
<form class="form-default" role="form" action="{{ route('reviews.store') }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{ $detailedProduct->id }}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="" class="text-uppercase c-gray-light">{{ translate('Your name')}}</label>
|
||||
<input type="text" name="name" value="{{ Auth::user()->name }}" class="form-control" disabled required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="" class="text-uppercase c-gray-light">{{ translate('Email')}}</label>
|
||||
<input type="text" name="email" value="{{ Auth::user()->email }}" class="form-control" required disabled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="opacity-60">{{ translate('Rating')}}</label>
|
||||
<div class="rating rating-input">
|
||||
<label>
|
||||
<input type="radio" name="rating" value="1" required>
|
||||
<i class="las la-star"></i>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="rating" value="2">
|
||||
<i class="las la-star"></i>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="rating" value="3">
|
||||
<i class="las la-star"></i>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="rating" value="4">
|
||||
<i class="las la-star"></i>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="rating" value="5">
|
||||
<i class="las la-star"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="opacity-60">{{ translate('Comment')}}</label>
|
||||
<textarea class="form-control" rows="4" name="comment" placeholder="{{ translate('Your review')}}" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary mt-3">
|
||||
{{ translate('Submit review')}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<div class="modal fade" id="chat_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-zoom product-modal" id="modal-size" role="document">
|
||||
<div class="modal-content position-relative">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fw-600 h5">{{ translate('Any query about this product')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form class="" action="{{ route('conversations.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{ $detailedProduct->id }}">
|
||||
<div class="modal-body gry-bg px-3 pt-3">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control mb-3" name="title" value="{{ $detailedProduct->name }}" placeholder="{{ translate('Product Name') }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="8" name="message" required placeholder="{{ translate('Your Question') }}">{{ route('product', $detailedProduct->slug) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-primary fw-600" data-dismiss="modal">{{ translate('Cancel')}}</button>
|
||||
<button type="submit" class="btn btn-primary fw-600">{{ translate('Send')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="login_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-zoom" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title fw-600">{{ translate('Login')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="p-3">
|
||||
<form class="form-default" role="form" action="{{ route('cart.login.submit') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
@if (addon_is_activated('otp_system'))
|
||||
<input type="text" class="form-control h-auto form-control-lg {{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ old('email') }}" placeholder="{{ translate('Email Or Phone')}}" name="email" id="email">
|
||||
@else
|
||||
<input type="email" class="form-control h-auto form-control-lg {{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ old('email') }}" placeholder="{{ translate('Email') }}" name="email">
|
||||
@endif
|
||||
@if (addon_is_activated('otp_system'))
|
||||
<span class="opacity-60">{{ translate('Use country code before number') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="password" name="password" class="form-control h-auto form-control-lg" placeholder="{{ translate('Password')}}">
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-6">
|
||||
<label class="aiz-checkbox">
|
||||
<input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}>
|
||||
<span class=opacity-60>{{ translate('Remember Me') }}</span>
|
||||
<span class="aiz-square-check"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a href="{{ route('password.request') }}" class="text-reset opacity-60 fs-14">{{ translate('Forgot password?')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<button type="submit" class="btn btn-primary btn-block fw-600">{{ translate('Login') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="text-center mb-3">
|
||||
<p class="text-muted mb-0">{{ translate('Dont have an account?')}}</p>
|
||||
<a href="{{ route('user.registration') }}">{{ translate('Register Now')}}</a>
|
||||
</div>
|
||||
@if(get_setting('google_login') == 1 ||
|
||||
get_setting('facebook_login') == 1 ||
|
||||
get_setting('twitter_login') == 1)
|
||||
<div class="separator mb-3">
|
||||
<span class="bg-white px-3 opacity-60">{{ translate('Or Login With')}}</span>
|
||||
</div>
|
||||
<ul class="list-inline social colored text-center mb-5">
|
||||
@if (get_setting('facebook_login') == 1)
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ route('social.login', ['provider' => 'facebook']) }}" class="facebook">
|
||||
<i class="lab la-facebook-f"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(get_setting('google_login') == 1)
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ route('social.login', ['provider' => 'google']) }}" class="google">
|
||||
<i class="lab la-google"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (get_setting('twitter_login') == 1)
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ route('social.login', ['provider' => 'twitter']) }}" class="twitter">
|
||||
<i class="lab la-twitter"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($detailedProduct->auction_product == 1)
|
||||
{{-- Bid Modal --}}
|
||||
<div class="modal fade" id="bid_for_product" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{ translate('Bid For Product') }} <small>({{ translate('Min Bid Amount: ').$min_bid_amount }})</small> </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" action="{{ route('auction_product_bids.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{ $detailedProduct->id }}">
|
||||
<div class="form-group">
|
||||
<label class="form-label">
|
||||
{{translate('Place Bid Price')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="form-group">
|
||||
<input type="number" step="0.01" class="form-control form-control-sm" name="amount" min="{{ $min_bid_amount }}" placeholder="{{ translate('Enter Amount') }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary transition-3d-hover mr-1">{{ translate('Submit') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function show_chat_modal(){
|
||||
@if (Auth::check())
|
||||
$('#chat_modal').modal('show');
|
||||
@else
|
||||
$('#login_modal').modal('show');
|
||||
@endif
|
||||
}
|
||||
|
||||
function bid_modal(){
|
||||
@if (Auth::check() && (Auth::user()->user_type == 'customer' || Auth::user()->user_type == 'seller'))
|
||||
$('#bid_for_product').modal('show');
|
||||
@else
|
||||
$('#login_modal').modal('show');
|
||||
@endif
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,138 @@
|
||||
<section class="mb-2 mb-md-3 mt-2 mt-md-3">
|
||||
<div class="container">
|
||||
<!-- Top Section -->
|
||||
<div class="d-flex mb-2 mb-md-3 align-items-baseline justify-content-between">
|
||||
<!-- Title -->
|
||||
<h3 class="fs-16 fs-md-20 fw-700 mb-2 mb-sm-0">
|
||||
<span class="">{{ translate('Auction Products') }}</span>
|
||||
</h3>
|
||||
<!-- Links -->
|
||||
<div class="d-flex">
|
||||
<a class="text-blue fs-10 fs-md-12 fw-700 hov-text-primary animate-underline-primary" href="{{ route('auction_products.all') }}">{{ translate('View All Products') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Products Section -->
|
||||
<div class="row gutters-16">
|
||||
<div class="col-xl-4 col-lg-6 mb-3 mb-lg-0">
|
||||
<div class="h-100 w-100 overflow-hidden">
|
||||
<a href="{{ route('auction_products.all') }}" class="hov-scale-img">
|
||||
<img class="img-fit lazyload mx-auto h-400px h-lg-485px has-transition"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset(get_setting('auction_banner_image')) }}"
|
||||
alt="{{ env('APP_NAME') }} promo"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
$products = \App\Models\Product::latest()->where('published', 1)->where('auction_product', 1);
|
||||
if(get_setting('seller_auction_product') == 0){
|
||||
$products = $products->where('added_by','admin');
|
||||
}
|
||||
$products = $products->where('auction_start_date','<=', strtotime("now"))->where('auction_end_date','>=', strtotime("now"))->limit(6)->get();
|
||||
@endphp
|
||||
<div class="col-xl-8 col-lg-6">
|
||||
<div class="aiz-carousel arrow-x-0 border-right arrow-inactive-none" data-items="2" data-xxl-items="2" data-xl-items="2" data-lg-items="1" data-md-items="2" data-sm-items="1" data-xs-items="1" data-arrows="true" data-dots="false">
|
||||
@php
|
||||
$init = 0 ;
|
||||
$end = 2 ;
|
||||
@endphp
|
||||
@for ($i = 0; $i < 2; $i++)
|
||||
<div class="carousel-box border-top border-left">
|
||||
@foreach ($products as $key => $product)
|
||||
@if ($key >= $init && $key <= $end)
|
||||
<div class="position-relative border-bottom @if($i==1) border-right @endif has-transition hov-animate-outline">
|
||||
<div class="row hov-scale-img">
|
||||
<div class="col-5">
|
||||
<a href="{{ route('auction-product', $product->slug) }}" class="d-block overflow-hidden h-100px h-sm-120px h-md-140px text-center p-2">
|
||||
<img class="img-fluid h-100 lazyload mx-auto has-transition"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($product->thumbnail_img) }}"
|
||||
alt="{{ $product->getTranslation('name') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col p-2 ">
|
||||
<h3 class="fw-400 fs-14 text-truncate-2 lh-1-4 mb-0 h-35px mb-3 d-none d-md-block">
|
||||
<a href="{{ route('auction-product', $product->slug) }}" class="d-block text-reset hov-text-primary">{{ $product->getTranslation('name') }}</a>
|
||||
</h3>
|
||||
<div class="fs-14">
|
||||
<span class="text-secondary">{{ translate('Starting Bid') }}</span><br>
|
||||
<span class="fw-700 text-primary">{{ single_price($product->starting_bid) }}</span>
|
||||
</div>
|
||||
@php
|
||||
$highest_bid = $product->bids->max('amount');
|
||||
$min_bid_amount = $highest_bid != null ? $highest_bid+1 : $product->starting_bid;
|
||||
@endphp
|
||||
<button class="btn btn-primary btn-sm rounded-0 mt-3" onclick="bid_single_modal({{ $product->id }}, {{ $min_bid_amount }})">{{ translate('Place Bid') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@php
|
||||
$init += 3;
|
||||
$end += 3;
|
||||
@endphp
|
||||
</div>
|
||||
@endfor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// Country Code
|
||||
var isPhoneShown = true,
|
||||
countryData = window.intlTelInputGlobals.getCountryData(),
|
||||
input = document.querySelector("#phone-code");
|
||||
|
||||
for (var i = 0; i < countryData.length; i++) {
|
||||
var country = countryData[i];
|
||||
if (country.iso2 == 'bd') {
|
||||
country.dialCode = '88';
|
||||
}
|
||||
}
|
||||
|
||||
var iti = intlTelInput(input, {
|
||||
separateDialCode: true,
|
||||
utilsScript: "{{ static_asset('assets/js/intlTelutils.js') }}?1590403638580",
|
||||
onlyCountries: @php echo json_encode(\App\Models\Country::where('status', 1)->pluck('code')->toArray()) @endphp,
|
||||
customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {
|
||||
if (selectedCountryData.iso2 == 'bd') {
|
||||
return "01xxxxxxxxx";
|
||||
}
|
||||
return selectedCountryPlaceholder;
|
||||
}
|
||||
});
|
||||
|
||||
var country = iti.getSelectedCountryData();
|
||||
$('input[name=country_code]').val(country.dialCode);
|
||||
|
||||
input.addEventListener("countrychange", function(e) {
|
||||
// var currentMask = e.currentTarget.placeholder;
|
||||
|
||||
var country = iti.getSelectedCountryData();
|
||||
$('input[name=country_code]').val(country.dialCode);
|
||||
|
||||
});
|
||||
|
||||
function toggleEmailPhone(el) {
|
||||
if (isPhoneShown) {
|
||||
$('.phone-form-group').addClass('d-none');
|
||||
$('.email-form-group').removeClass('d-none');
|
||||
$('input[name=phone]').val(null);
|
||||
isPhoneShown = false;
|
||||
$(el).html('{{ translate('Use Phone Instead') }}');
|
||||
} else {
|
||||
$('.phone-form-group').removeClass('d-none');
|
||||
$('.email-form-group').addClass('d-none');
|
||||
$('input[name=email]').val(null);
|
||||
isPhoneShown = true;
|
||||
$(el).html('{{ translate('Use Email Instead') }}');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
124
resources/views/auction/frontend/my_bidded_products.blade.php
Normal file
124
resources/views/auction/frontend/my_bidded_products.blade.php
Normal file
@@ -0,0 +1,124 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-20 fw-700 text-dark">{{ translate('All Bidded Products') }}</h5>
|
||||
</div>
|
||||
<div class="card-body py-0">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">#</th>
|
||||
<th width="40%" >{{ translate('Product')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('My Bid')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('Highest Bid')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('End Date')}}</th>
|
||||
<th class="text-right pr-0">{{ translate('Action')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="fs-14">
|
||||
@foreach ($bids as $key => $bid_id)
|
||||
@php
|
||||
$bid = \App\Models\AuctionProductBid::find($bid_id->id);
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="pl-0" style="vertical-align: middle;">{{ sprintf('%02d', ($key+1) + ($bids->currentPage() - 1)*$bids->perPage()) }}</td>
|
||||
<td class="text-dark" style="vertical-align: middle;">
|
||||
<a href="{{ route('auction-product', $bid->product->slug) }}" class="text-reset hov-text-primary d-flex align-items-center">
|
||||
<img class="lazyload img-fit size-70px"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($bid->product->thumbnail_img) }}"
|
||||
alt="{{ $bid->product->getTranslation('name') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
<span class="ml-1">{{ $bid->product->getTranslation('name') }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="fw-700" style="vertical-align: middle;">{{ single_price($bid->amount) }}</td>
|
||||
<td style="vertical-align: middle;">
|
||||
@php $highest_bid = $bid->where('product_id',$bid->product_id)->max('amount'); @endphp
|
||||
<span class="badge badge-inline @if($bid->amount < $highest_bid) badge-danger @else badge-success @endif p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">
|
||||
{{ single_price($highest_bid) }}
|
||||
</span>
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
@if($bid->product->auction_end_date < strtotime("now"))
|
||||
{{ translate('Ended') }}
|
||||
@else
|
||||
{{ date('d.m.Y H:i:s', $bid->product->auction_end_date) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right pr-0" style="vertical-align: middle;">
|
||||
@php
|
||||
$order = null;
|
||||
$order_detail = \App\Models\OrderDetail::where('product_id',$bid->product_id)->first();
|
||||
if($order_detail != null ){
|
||||
$order = \App\Models\Order::where('id',$order_detail->order_id)->where('user_id',Auth::user()->id)->first();
|
||||
}
|
||||
@endphp
|
||||
@if($bid->product->auction_end_date < strtotime("now") && $bid->amount == $highest_bid && $order == null)
|
||||
@php
|
||||
$carts = \App\Models\Cart::where('user_id', Auth::user()->id)->get();
|
||||
@endphp
|
||||
@if(count($carts) > 0 )
|
||||
@php
|
||||
$cart_has_this_product = false;
|
||||
foreach ($carts as $key => $cart){
|
||||
if($cart->product_id == $bid->product_id){
|
||||
$cart_has_this_product = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
@if($cart_has_this_product)
|
||||
<button type="button" class="btn btn-sm btn-primary buy-now fw-600 rounded-0" data-toggle="tooltip" title="{{ translate('Item alreday added to the cart.') }}">
|
||||
{{ translate('Buy') }}
|
||||
</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-sm btn-primary buy-now fw-600 rounded-0" data-toggle="tooltip" title="{{ translate('Remove other items to add auction product.') }}">
|
||||
{{ translate('Buy') }}
|
||||
</button>
|
||||
@endif
|
||||
@else
|
||||
<button type="button" class="btn btn-sm btn-primary buy-now fw-600 rounded-0" onclick="showAuctionAddToCartModal({{ $bid->product_id }})">
|
||||
{{ translate('Buy') }}
|
||||
</button>
|
||||
@endif
|
||||
@elseif($order != null)
|
||||
<span class="badge badge-success p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;" >{{ translate('Purchased') }}</span>
|
||||
@else
|
||||
N\A
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $bids->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function showAuctionAddToCartModal(id){
|
||||
if(!$('#modal-size').hasClass('modal-lg')){
|
||||
$('#modal-size').addClass('modal-lg');
|
||||
}
|
||||
$('#addToCart-modal-body').html(null);
|
||||
$('#addToCart').modal();
|
||||
$('.c-preloader').show();
|
||||
$.post('{{ route('auction.cart.showCartModal') }}', {_token: AIZ.data.csrf, id:id}, function(data){
|
||||
$('.c-preloader').hide();
|
||||
$('#addToCart-modal-body').html(data);
|
||||
AIZ.plugins.slickCarousel();
|
||||
AIZ.plugins.zoom();
|
||||
AIZ.extra.plusMinus();
|
||||
getVariantPrice();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
108
resources/views/auction/frontend/purchase_history.blade.php
Normal file
108
resources/views/auction/frontend/purchase_history.blade.php
Normal file
@@ -0,0 +1,108 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-20 fw-700 text-dark">{{ translate('Purchase History from Auction') }}</h5>
|
||||
</div>
|
||||
<div class="card-body py-0">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">{{ translate('Code')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('Date')}}</th>
|
||||
<th>{{ translate('Amount')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('Delivery Status')}}</th>
|
||||
<th data-breakpoints="md">{{ translate('Payment Status')}}</th>
|
||||
<th class="text-right pr-0">{{ translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="fs-14">
|
||||
@foreach ($orders as $key => $order_id)
|
||||
@php
|
||||
$order = \App\Models\Order::find($order_id->id);
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="pl-0">
|
||||
<a href="#{{ $order->code }}" onclick="show_purchase_history_details({{ $order->id }})" class="fw-700 text-primary">{{ $order->code }}</a>
|
||||
</td>
|
||||
<td class="text-secondary">{{ date('d-m-Y', $order->date) }}</td>
|
||||
<td class="fw-700">
|
||||
{{ single_price($order->grand_total) }}
|
||||
</td>
|
||||
<td class="fw-700">
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $order->orderDetails->first()->delivery_status))) }}
|
||||
@if($order->delivery_viewed == 0)
|
||||
<span class="ml-2" style="color:green"><strong>*</strong></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->payment_status == 'paid')
|
||||
<span class="badge badge-inline badge-success p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{translate('Paid')}}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-danger p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{translate('Unpaid')}}</span>
|
||||
@endif
|
||||
@if($order->payment_status_viewed == 0)
|
||||
<span class="ml-2" style="color:green"><strong>*</strong></span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right pr-0">
|
||||
@if ($order->orderDetails->first()->delivery_status == 'pending' && $order->payment_status == 'unpaid')
|
||||
<a href="javascript:void(0)" class="btn btn-soft-danger btn-icon btn-circle btn-sm hov-svg-white confirm-delete" data-href="{{route('orders.destroy', $order->id)}}" title="{{ translate('Cancel') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="9.202" height="12" viewBox="0 0 9.202 12">
|
||||
<path id="Path_28714" data-name="Path 28714" d="M15.041,7.608l-.193,5.85a1.927,1.927,0,0,1-1.933,1.864H9.243A1.927,1.927,0,0,1,7.31,13.46L7.117,7.608a.483.483,0,0,1,.966-.032l.193,5.851a.966.966,0,0,0,.966.929h3.672a.966.966,0,0,0,.966-.931l.193-5.849a.483.483,0,1,1,.966.032Zm.639-1.947a.483.483,0,0,1-.483.483H6.961a.483.483,0,1,1,0-.966h1.5a.617.617,0,0,0,.615-.555,1.445,1.445,0,0,1,1.442-1.3h1.126a1.445,1.445,0,0,1,1.442,1.3.617.617,0,0,0,.615.555h1.5a.483.483,0,0,1,.483.483ZM9.913,5.178h2.333a1.6,1.6,0,0,1-.123-.456.483.483,0,0,0-.48-.435H10.516a.483.483,0,0,0-.48.435,1.6,1.6,0,0,1-.124.456ZM10.4,12.5V8.385a.483.483,0,0,0-.966,0V12.5a.483.483,0,1,0,.966,0Zm2.326,0V8.385a.483.483,0,0,0-.966,0V12.5a.483.483,0,1,0,.966,0Z" transform="translate(-6.478 -3.322)" fill="#d43533"/>
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
<a href="javascript:void(0)" class="btn btn-soft-info btn-icon btn-circle btn-sm hov-svg-white" onclick="show_purchase_history_details({{ $order->id }})" title="{{ translate('Order Details') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10">
|
||||
<g id="Group_24807" data-name="Group 24807" transform="translate(-1339 -422)">
|
||||
<rect id="Rectangle_18658" data-name="Rectangle 18658" width="12" height="1" transform="translate(1339 422)" fill="#3490f3"/>
|
||||
<rect id="Rectangle_18659" data-name="Rectangle 18659" width="12" height="1" transform="translate(1339 425)" fill="#3490f3"/>
|
||||
<rect id="Rectangle_18660" data-name="Rectangle 18660" width="12" height="1" transform="translate(1339 428)" fill="#3490f3"/>
|
||||
<rect id="Rectangle_18661" data-name="Rectangle 18661" width="12" height="1" transform="translate(1339 431)" fill="#3490f3"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="btn btn-soft-warning btn-icon btn-circle btn-sm hov-svg-white" href="{{ route('invoice.download', $order->id) }}" title="{{ translate('Download Invoice') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12.001" viewBox="0 0 12 12.001">
|
||||
<g id="Group_24807" data-name="Group 24807" transform="translate(-1341 -424.999)">
|
||||
<path id="Union_17" data-name="Union 17" d="M13936.389,851.5l.707-.707,2.355,2.355V846h1v7.1l2.306-2.306.707.707-3.538,3.538Z" transform="translate(-12592.95 -421)" fill="#f3af3d"/>
|
||||
<rect id="Rectangle_18661" data-name="Rectangle 18661" width="12" height="1" transform="translate(1341 436)" fill="#f3af3d"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $orders->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
|
||||
<div class="modal fade" id="order_details" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div id="order-details-modal-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$('#order_details').on('hidden.bs.modal', function () {
|
||||
location.reload();
|
||||
})
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,424 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h1 class="mb-0 h6">{{ translate('Edit Auction Product') }}</h5>
|
||||
</div>
|
||||
<div class="">
|
||||
<form class="form form-horizontal mar-top" action="{{route('auction_product_update.seller', $product->id)}}" method="POST" enctype="multipart/form-data">
|
||||
<input name="_method" type="hidden" value="POST">
|
||||
<input type="hidden" name="id" value="{{ $product->id }}">
|
||||
<input type="hidden" name="lang" value="{{ $lang }}">
|
||||
@csrf
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-8">
|
||||
|
||||
<div class="card">
|
||||
<ul class="nav nav-tabs nav-fill border-light">
|
||||
@foreach (\App\Models\Language::all() as $key => $language)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-reset @if ($language->code == $lang) active @else bg-soft-dark border-light border-left-0 @endif py-3" href="{{ route('auction_product_edit.seller', ['id'=>$product->id, 'lang'=> $language->code] ) }}">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" height="11" class="mr-1">
|
||||
<span>{{$language->name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Product Name')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="name" placeholder="{{translate('Product Name')}}" value="{{ $product->getTranslation('name', $lang) }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Category')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="category_id" id="category_id" data-selected="{{ $product->category_id }}" data-live-search="true" required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="brand">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Brand')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="brand_id" id="brand_id" data-live-search="true">
|
||||
<option value="">{{ translate('Select Brand') }}</option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}" @if($product->brand_id == $brand->id) selected @endif>{{ $brand->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Unit')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i> </label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="unit" placeholder="{{ translate('Unit (e.g. KG, Pc etc)') }}" value="{{$product->getTranslation('unit', $lang)}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Tags')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control aiz-tag-input" name="tags[]" id="tags" value="{{ $product->tags }}" placeholder="{{ translate('Type to add a tag') }}" data-role="tagsinput">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Images')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Gallery Images')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" value="{{ $product->photos }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Thumbnail Image')}} <small>(290x300)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" value="{{ $product->thumbnail_img }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Videos')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Video Provider')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<select class="form-control aiz-selectpicker" name="video_provider" id="video_provider">
|
||||
<option value="youtube" <?php if ($product->video_provider == 'youtube') echo "selected"; ?> >{{translate('Youtube')}}</option>
|
||||
<option value="dailymotion" <?php if ($product->video_provider == 'dailymotion') echo "selected"; ?> >{{translate('Dailymotion')}}</option>
|
||||
<option value="vimeo" <?php if ($product->video_provider == 'vimeo') echo "selected"; ?> >{{translate('Vimeo')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Video Link')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="video_link" value="{{ $product->video_link }}" placeholder="{{ translate('Video Link') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Bidding Price + Date Range')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Starting Bidding Price')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" placeholder="{{translate('Starting Bidding Price')}}" name="starting_bid" class="form-control" value="{{$product->starting_bid}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$start_date = date('d-m-Y H:i:s', $product->auction_start_date);
|
||||
$end_date = date('d-m-Y H:i:s', $product->auction_end_date);
|
||||
@endphp
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="start_date">{{translate('Auction Date Range')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" value="{{ $start_date.' to '.$end_date }}" name="auction_date_range" placeholder="{{translate('Select Date')}}" data-time-picker="true" data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Product Description')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Description')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-lg-9">
|
||||
<textarea class="aiz-text-editor" name="description">{{ $product->getTranslation('description', $lang) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('PDF Specification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('PDF Specification')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" value="{{ $product->pdf }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('SEO Meta Tags')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="meta_title" value="{{ $product->meta_title }}" placeholder="{{translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="meta_description" rows="8" class="form-control">{{ $product->meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Meta Images')}}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" value="{{ $product->meta_img }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Slug')}}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" placeholder="{{translate('Slug')}}" id="slug" name="slug" value="{{ $product->slug }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6" class="dropdown-toggle" data-toggle="collapse" data-target="#collapse_2">
|
||||
{{translate('Shipping Configuration')}}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body collapse show" id="collapse_2">
|
||||
@if (get_setting('shipping_type') == 'product_wise_shipping')
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Free Shipping')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="free" @if($product->shipping_type == 'free') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Flat Rate')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="flat_rate" @if($product->shipping_type == 'flat_rate') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flat_rate_shipping_div" style="display: none">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-6 col-from-label">{{translate('Shipping cost')}}</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="number" lang="en" min="0" value="{{ $product->shipping_cost }}" step="0.01" placeholder="{{ translate('Shipping cost') }}" name="flat_shipping_cost" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Is Product Quantity Mulitiply')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="is_quantity_multiplied" value="1" @if($product->is_quantity_multiplied == 1) checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Product wise shipping cost is disable. Shipping cost is configured from here') }}
|
||||
<a href="{{route('shipping_configuration.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Shipping Configuration')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Cash On Delivery')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (get_setting('cash_payment') == '1')
|
||||
<div class="form-group row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{translate('Status')}}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="cash_on_delivery" value="1" @if($product->cash_on_delivery == 1) checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Cash On Delivery option is disabled. Activate this feature from here') }}
|
||||
<a href="{{route('activation.index')}}" class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index','shipping_configuration.edit','shipping_configuration.update'])}}">
|
||||
<span class="aiz-side-nav-text">{{translate('Cash Payment Activation')}}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Estimate Shipping Time')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">
|
||||
{{translate('Shipping Days')}}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="est_shipping_days" value="{{ $product->est_shipping_days }}" min="1" step="1" placeholder="{{translate('Shipping Days')}}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">{{translate('Days')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('VAT & Tax')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach(\App\Models\Tax::where('tax_status', 1)->get() as $tax)
|
||||
<label for="name">
|
||||
{{$tax->name}}
|
||||
<input type="hidden" value="{{$tax->id}}" name="tax_id[]">
|
||||
</label>
|
||||
|
||||
@php
|
||||
$tax_amount = 0;
|
||||
$tax_type = '';
|
||||
foreach($tax->product_taxes as $row) {
|
||||
if($product->id == $row->product_id) {
|
||||
$tax_amount = $row->tax;
|
||||
$tax_type = $row->tax_type;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<input type="number" lang="en" min="0" value="{{ $tax_amount }}" step="0.01" placeholder="{{ translate('Tax') }}" name="tax[]" class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<select class="form-control aiz-selectpicker" name="tax_type[]">
|
||||
<option value="amount" @if($tax_type == 'amount') selected @endif>
|
||||
{{translate('Flat')}}
|
||||
</option>
|
||||
<option value="percent" @if($tax_type == 'percent') selected @endif>
|
||||
{{translate('Percent')}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="mb-3 text-right">
|
||||
<button type="submit" name="button" class="btn btn-info">{{ translate('Update Product') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function (){
|
||||
show_hide_shipping_div();
|
||||
});
|
||||
|
||||
$("[name=shipping_type]").on("change", function (){
|
||||
show_hide_shipping_div();
|
||||
});
|
||||
|
||||
function show_hide_shipping_div() {
|
||||
var shipping_val = $("[name=shipping_type]:checked").val();
|
||||
|
||||
$(".flat_rate_shipping_div").hide();
|
||||
|
||||
if(shipping_val == 'flat_rate'){
|
||||
$(".flat_rate_shipping_div").show();
|
||||
}
|
||||
}
|
||||
|
||||
AIZ.plugins.tagify();
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.remove-files').on('click', function(){
|
||||
$(this).parents(".col-md-4").remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,135 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="row gutters-10 justify-content-center">
|
||||
@if (addon_is_activated('seller_subscription'))
|
||||
<div class="col-md-4 mx-auto mb-3" >
|
||||
<div class="bg-grad-1 text-white rounded-lg overflow-hidden">
|
||||
<span class="size-30px rounded-circle mx-auto bg-soft-primary d-flex align-items-center justify-content-center mt-3">
|
||||
<i class="las la-upload la-2x text-white"></i>
|
||||
</span>
|
||||
<div class="px-3 pt-3 pb-3">
|
||||
<div class="h4 fw-700 text-center">
|
||||
{{ Auth::user()->shop->seller_package != null ? Auth::user()->shop->seller_package->product_upload_limit - Auth::user()->products()->count() : 0 }}
|
||||
</div>
|
||||
<div class="opacity-50 text-center">{{ translate('Remaining Uploads') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-4 mx-auto mb-3" >
|
||||
<a href="{{ route('auction_product_create.seller')}}">
|
||||
<div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
|
||||
<span class="size-60px rounded-circle mx-auto bg-secondary d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-18 text-primary">{{ translate('Add New Auction Product') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (addon_is_activated('seller_subscription'))
|
||||
@php
|
||||
$seller_package = \App\Models\SellerPackage::find(Auth::user()->shop->seller_package_id);
|
||||
@endphp
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('seller.seller_packages_list') }}" class="text-center bg-white shadow-sm hov-shadow-lg text-center d-block p-3 rounded">
|
||||
@if($seller_package != null)
|
||||
<img src="{{ uploaded_asset($seller_package->logo) }}" height="44" class="mw-100 mx-auto">
|
||||
<span class="d-block sub-title mb-2">{{ translate('Current Package')}}: {{ $seller_package->getTranslation('name') }}</span>
|
||||
@else
|
||||
<i class="la la-frown-o mb-2 la-3x"></i>
|
||||
<div class="d-block sub-title mb-2">{{ translate('No Package Found')}}</div>
|
||||
@endif
|
||||
<div class="btn btn-outline-primary py-1">{{ translate('Upgrade Package')}}</div>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="card">
|
||||
<form class="" id="sort_products" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-md-0 h6">{{ translate('All Auction Product') }}</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control form-control-sm" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Bid Starting Amount')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Auction Start Date')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Auction End Date')}}</th>
|
||||
<th data-breakpoints="sm">{{translate('Total Bids')}}</th>
|
||||
<th data-breakpoints="sm" class="text-right" width="20%">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($products as $key => $product)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($products->currentPage() - 1)*$products->perPage() }}</td>
|
||||
<td>
|
||||
<div class="row gutters-5 w-200px w-md-300px mw-100">
|
||||
<div class="col-auto">
|
||||
<img src="{{ uploaded_asset($product->thumbnail_img)}}" alt="Image" class="size-50px img-fit">
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="text-muted text-truncate-2">{{ $product->getTranslation('name') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ single_price($product->starting_bid) }}</td>
|
||||
<td>{{ date('Y-m-d H:i:s', $product->auction_start_date) }}</td>
|
||||
<td>{{ date('Y-m-d H:i:s', $product->auction_end_date) }}</td>
|
||||
<td>{{ $product->bids->count() }}</td>
|
||||
<td class="text-right">
|
||||
@if($product->auction_start_date > strtotime("now"))
|
||||
<a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="{{route('auction_product_edit.seller', ['id'=>$product->id, 'lang'=>env('DEFAULT_LANGUAGE')] )}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endif
|
||||
<a class="btn btn-soft-success btn-icon btn-circle btn-sm" href="{{ route('auction-product', $product->slug) }}" target="_blank" title="{{ translate('View Products') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
<a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="{{ route('product_bids.seller', $product->id) }}" target="_blank" title="{{ translate('View All Bids') }}">
|
||||
<i class="las la-gavel"></i>
|
||||
</a>
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('auction_product_destroy.seller', $product->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function sort_products(el){
|
||||
$('#sort_products').submit();
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,181 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="card">
|
||||
<form class="" id=" sort_orders" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col text-center text-md-left">
|
||||
<h5 class="mb-md-0 h6">{{ translate('Inhouse Orders') }}</h5>
|
||||
</div>
|
||||
<div class="col-lg-3 ml-auto">
|
||||
<select class="form-control aiz-selectpicker" name="payment_type" id="payment_type"
|
||||
onchange="sort_orders()">
|
||||
<option value="">{{ translate('Filter by Payment Status') }}</option>
|
||||
<option value="paid" @isset($payment_status) @if ($payment_status == 'paid') selected @endif @endisset>
|
||||
{{ translate('Paid') }}</option>
|
||||
<option value="unpaid" @isset($payment_status) @if ($payment_status == 'unpaid') selected @endif @endisset>
|
||||
{{ translate('Un-Paid') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 ml-auto">
|
||||
<select class="form-control aiz-selectpicker" name="delivery_status" id="delivery_status"
|
||||
onchange="sort_orders()">
|
||||
<option value="">{{ translate('Filter by Deliver Status') }}</option>
|
||||
<option value="pending" @isset($delivery_status) @if ($delivery_status == 'pending') selected @endif @endisset>
|
||||
{{ translate('Pending') }}</option>
|
||||
<option value="confirmed" @isset($delivery_status) @if ($delivery_status == 'confirmed') selected @endif @endisset>
|
||||
{{ translate('Confirmed') }}</option>
|
||||
<option value="on_delivery" @isset($delivery_status) @if ($delivery_status == 'on_delivery') selected @endif @endisset>
|
||||
{{ translate('On delivery') }}</option>
|
||||
<option value="delivered" @isset($delivery_status) @if ($delivery_status == 'delivered') selected @endif @endisset>
|
||||
{{ translate('Delivered') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control" id="search" name="search" @isset($sort_search)
|
||||
value="{{ $sort_search }}" @endisset
|
||||
placeholder="{{ translate('Type Order code & hit Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="form-group mb-0">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Filter') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Order Code') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Customer') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Amount') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Delivery Status') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Payment Method') }}</th>
|
||||
<th data-breakpoints="md">{{ translate('Payment Status') }}</th>
|
||||
@if (addon_is_activated('refund_request'))
|
||||
<th>{{ translate('Refund') }}</th>
|
||||
@endif
|
||||
<th class="text-right" width="15%">{{ translate('Options') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($orders as $key => $order_id)
|
||||
@php
|
||||
$order = \App\Models\Order::find($order_id->id);
|
||||
@endphp
|
||||
@if ($order != null)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $key + 1 + ($orders->currentPage() - 1) * $orders->perPage() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $order->code }}@if ($order->viewed == 0) <span class="badge badge-inline badge-info">{{ translate('New') }}</span>@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->user != null)
|
||||
{{ $order->user->name }}
|
||||
@else
|
||||
Guest ({{ $order->guest_id }})
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ single_price($order->grand_total) }}
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$status = $order->delivery_status;
|
||||
@endphp
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $status))) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $order->payment_type))) }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->payment_status == 'paid')
|
||||
<span class="badge badge-inline badge-success">{{ translate('Paid') }}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-danger">{{ translate('Unpaid') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
@if (addon_is_activated('refund_request'))
|
||||
<td>
|
||||
@if (count($order->refund_requests) > 0)
|
||||
{{ count($order->refund_requests) }} {{ translate('Refund') }}
|
||||
@else
|
||||
{{ translate('No Refund') }}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
<td class="text-right">
|
||||
<a href="javascript:void(0)" class="btn btn-soft-info btn-icon btn-circle btn-sm"
|
||||
onclick="show_order_details({{ $order->id }})"
|
||||
title="{{ translate('Order Details') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
<a class="btn btn-soft-success btn-icon btn-circle btn-sm"
|
||||
href="{{ route('invoice.download', $order->id) }}"
|
||||
title="{{ translate('Download Invoice') }}">
|
||||
<i class="las la-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $orders->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
|
||||
<div class="modal fade" id="order_details" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div id="order-details-modal-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function sort_orders(el) {
|
||||
$('#sort_orders').submit();
|
||||
}
|
||||
|
||||
function show_order_details(order_id) {
|
||||
$('#order-details-modal-body').html(null);
|
||||
|
||||
if (!$('#modal-size').hasClass('modal-lg')) {
|
||||
$('#modal-size').addClass('modal-lg');
|
||||
}
|
||||
|
||||
$.post('{{ route('orders.details') }}', {
|
||||
_token: AIZ.data.csrf,
|
||||
order_id: order_id
|
||||
}, function(data) {
|
||||
$('#order-details-modal-body').html(data);
|
||||
$('#order_details').modal();
|
||||
$('.c-preloader').hide();
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,428 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h5 class="mb-0 h6">{{ translate('Add New Auction Product') }}</h5>
|
||||
</div>
|
||||
<div class="">
|
||||
<form class=" form form-horizontal mar-top" action="{{ route('auction_product_store.seller') }}"
|
||||
method="POST" enctype="multipart/form-data" id="choice_form">
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-8">
|
||||
@csrf
|
||||
<input type="hidden" name="added_by" value="seller">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Information') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Product Name') }} <span
|
||||
class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="name"
|
||||
placeholder="{{ translate('Product Name') }}" onchange="update_sku()" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Category') }} <span
|
||||
class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="category_id" id="category_id"
|
||||
data-live-search="true" required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}
|
||||
</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="brand">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Brand') }}</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="brand_id" id="brand_id"
|
||||
data-live-search="true">
|
||||
<option value="">{{ translate('Select Brand') }}</option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}">{{ $brand->getTranslation('name') }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Unit') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="unit"
|
||||
placeholder="{{ translate('Unit (e.g. KG, Pc etc)') }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Tags') }} <span
|
||||
class="text-danger">*</span></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control aiz-tag-input" name="tags[]"
|
||||
placeholder="{{ translate('Type and hit enter to add a tag') }}">
|
||||
<small
|
||||
class="text-muted">{{ translate('This is used for search. Input those words by which cutomer can find this product.') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Images') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{ translate('Gallery Images') }}
|
||||
<small>(600x600)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image"
|
||||
data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse') }}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
<small
|
||||
class="text-muted">{{ translate('These images are visible in product details page gallery. Use 600x600 sizes images.') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{ translate('Thumbnail Image') }}
|
||||
<small>(300x300)</small></label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse') }}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
<small
|
||||
class="text-muted">{{ translate('This image is visible in all product box. Use 300x300 sizes image. Keep some blank space around main object of your image as we had to crop some edge in different devices to make it responsive.') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Videos') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Video Provider') }}</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control aiz-selectpicker" name="video_provider" id="video_provider">
|
||||
<option value="youtube">{{ translate('Youtube') }}</option>
|
||||
<option value="dailymotion">{{ translate('Dailymotion') }}</option>
|
||||
<option value="vimeo">{{ translate('Vimeo') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Video Link') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="video_link"
|
||||
placeholder="{{ translate('Video Link') }}">
|
||||
<small
|
||||
class="text-muted">{{ translate("Use proper link without extra parameter. Don't use short share link/embeded iframe code.") }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Bidding Price + Date Range') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Starting Bidding Price') }} <span
|
||||
class="text-danger">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01"
|
||||
placeholder="{{ translate('Starting bidding price') }}" name="starting_bid"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label"
|
||||
for="start_date">{{ translate('Auction Date Range') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" name="auction_date_range"
|
||||
placeholder="{{ translate('Select Date') }}" data-time-picker="true"
|
||||
data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Description') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Description') }}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="aiz-text-editor" name="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('PDF Specification') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label"
|
||||
for="signinSrEmail">{{ translate('PDF Specification') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="document">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse') }}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('SEO Meta Tags') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Meta Title') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="meta_title"
|
||||
placeholder="{{ translate('Meta Title') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">{{ translate('Description') }}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea name="meta_description" rows="8" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label"
|
||||
for="signinSrEmail">{{ translate('Meta Image') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse') }}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">
|
||||
{{ translate('Shipping Configuration') }}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (get_setting('shipping_type') == 'product_wise_shipping')
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{ translate('Free Shipping') }}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="free" checked>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{ translate('Flat Rate') }}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="shipping_type" value="flat_rate">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flat_rate_shipping_div" style="display: none">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{ translate('Shipping cost') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01"
|
||||
placeholder="{{ translate('Shipping cost') }}" name="flat_shipping_cost"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label
|
||||
class="col-md-6 col-from-label">{{ translate('Is Product Quantity Mulitiply') }}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="is_quantity_multiplied" value="1">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Product wise shipping cost is disable. Shipping cost is configured from here') }}
|
||||
<a href="{{ route('shipping_configuration.index') }}"
|
||||
class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index', 'shipping_configuration.edit', 'shipping_configuration.update']) }}">
|
||||
<span class="aiz-side-nav-text">{{ translate('Shipping Configuration') }}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Cash On Delivery') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (get_setting('cash_payment') == '1')
|
||||
<div class="form-group row">
|
||||
<label class="col-md-6 col-from-label">{{ translate('Status') }}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="cash_on_delivery" value="1" checked="">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
{{ translate('Cash On Delivery option is disabled. Activate this feature from here') }}
|
||||
<a href="{{ route('activation.index') }}"
|
||||
class="aiz-side-nav-link {{ areActiveRoutes(['shipping_configuration.index', 'shipping_configuration.edit', 'shipping_configuration.update']) }}">
|
||||
<span class="aiz-side-nav-text">{{ translate('Cash Payment Activation') }}</span>
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Estimate Shipping Time') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">
|
||||
{{ translate('Shipping Days') }}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="est_shipping_days" min="1" step="1"
|
||||
placeholder="{{ translate('Shipping Days') }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">{{ translate('Days') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('VAT & Tax') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach (\App\Models\Tax::where('tax_status', 1)->get() as $tax)
|
||||
<label for="name">
|
||||
{{ $tax->name }}
|
||||
<input type="hidden" value="{{ $tax->id }}" name="tax_id[]">
|
||||
</label>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<input type="number" lang="en" min="0" value="0" step="0.01"
|
||||
placeholder="{{ translate('Tax') }}" name="tax[]" class="form-control"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<select class="form-control aiz-selectpicker" name="tax_type[]">
|
||||
<option value="amount">{{ translate('Flat') }}</option>
|
||||
<option value="percent">{{ translate('Percent') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="btn-toolbar float-right mb-3" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="submit" name="button" value="draft"
|
||||
class="btn btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
$('form').bind('submit', function(e) {
|
||||
// Disable the submit button while evaluating if the form should be submitted
|
||||
$("button[type='submit']").prop('disabled', true);
|
||||
|
||||
var valid = true;
|
||||
|
||||
if (!valid) {
|
||||
e.preventDefault();
|
||||
|
||||
// Reactivate the button if the form was not submitted
|
||||
$("button[type='submit']").button.prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$("[name=shipping_type]").on("change", function() {
|
||||
$(".flat_rate_shipping_div").hide();
|
||||
|
||||
if ($(this).val() == 'flat_rate') {
|
||||
$(".flat_rate_shipping_div").show();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,62 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('Bids For').$product->name}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-md-0 h6">{{ translate('All Bids') }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Customer Name')}}</th>
|
||||
<th>{{translate('Email')}}</th>
|
||||
<th>{{translate('Phone')}}</th>
|
||||
<th>{{translate('Bid Amount')}}</th>
|
||||
<th>{{translate('Date')}}</th>
|
||||
<th data-breakpoints="sm" class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bids as $key => $bid)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($bids->currentPage() - 1)*$bids->perPage() }}</td>
|
||||
<td>{{ $bid->user->name }}</td>
|
||||
<td>{{ $bid->user->email }}</td>
|
||||
<td>{{ $bid->user->phone }}</td>
|
||||
<td>{{ single_price($bid->amount) }}</td>
|
||||
<td>{{ date('d-m-Y', strtotime($bid->created_at)) }}</td>
|
||||
<td class="text-right">
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('product_bids_destroy.seller', $bid->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $bids->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
90
resources/views/auth/login.blade.php
Normal file
90
resources/views/auth/login.blade.php
Normal file
@@ -0,0 +1,90 @@
|
||||
@extends('backend.layouts.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="h-100 bg-cover bg-center py-5 d-flex align-items-center" style="background-image: url({{ uploaded_asset(get_setting('admin_login_background')) }})">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xl-4 mx-auto">
|
||||
<div class="card text-left">
|
||||
<div class="card-body">
|
||||
<div class="mb-5 text-center">
|
||||
@if(get_setting('system_logo_black') != null)
|
||||
<img src="{{ uploaded_asset(get_setting('system_logo_black')) }}" class="mw-100 mb-4" height="40">
|
||||
@else
|
||||
<img src="{{ static_asset('assets/img/logo.png') }}" class="mw-100 mb-4" height="40">
|
||||
@endif
|
||||
<h1 class="h3 text-primary mb-0">{{ translate('Welcome to') }} {{ env('APP_NAME') }}</h1>
|
||||
<p>{{ translate('Login to your account.') }}</p>
|
||||
</div>
|
||||
<form class="pad-hor" method="POST" role="form" action="{{ route('login') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autofocus placeholder="{{ translate('Email') }}">
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required placeholder="{{ translate('Password') }}">
|
||||
@if ($errors->has('password'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<div class="text-left">
|
||||
<label class="aiz-checkbox">
|
||||
<input type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
|
||||
<span>{{ translate('Remember Me') }}</span>
|
||||
<span class="aiz-square-check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@if(env('MAIL_USERNAME') != null && env('MAIL_PASSWORD') != null)
|
||||
<div class="col-sm-6">
|
||||
<div class="text-right">
|
||||
<a href="{{ route('password.request') }}" class="text-reset fs-14">{{translate('Forgot password ?')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
||||
{{ translate('Login') }}
|
||||
</button>
|
||||
</form>
|
||||
@if (env("DEMO_MODE") == "On")
|
||||
<div class="mt-4">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>admin@example.com</td>
|
||||
<td>123456</td>
|
||||
<td><button class="btn btn-info btn-xs" onclick="autoFill()">{{ translate('Copy') }}</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function autoFill(){
|
||||
$('#email').val('admin@example.com');
|
||||
$('#password').val('123456');
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
140
resources/views/auth/passwords/email.blade.php
Normal file
140
resources/views/auth/passwords/email.blade.php
Normal file
@@ -0,0 +1,140 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="py-6">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xxl-5 col-xl-6 col-md-8 mx-auto">
|
||||
<div class="bg-white rounded shadow-sm p-4 text-left">
|
||||
<h1 class="h3 fw-600">{{ translate('Forgot Password?') }}</h1>
|
||||
<p class="mb-4 opacity-60">{{ translate('Enter your email address to recover your password.') }}
|
||||
</p>
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
|
||||
@if (addon_is_activated('otp_system'))
|
||||
<div class="form-group phone-form-group mb-1">
|
||||
<input type="tel" id="phone-code"
|
||||
class="form-control{{ $errors->has('phone') ? ' is-invalid' : '' }}"
|
||||
value="{{ old('phone') }}" placeholder="" name="phone" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="country_code" value="">
|
||||
|
||||
<div class="form-group email-form-group mb-1 d-none">
|
||||
<input type="email"
|
||||
class="form-control {{ $errors->has('email') ? ' is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ translate('Email') }}"
|
||||
name="email" id="email" autocomplete="off">
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button class="btn btn-link p-0 text-primary" type="button"
|
||||
onclick="toggleEmailPhone(this)"><i>*{{ translate('Use Email Instead') }}</i></button>
|
||||
</div>
|
||||
@else
|
||||
<div class="form-group">
|
||||
<input type="email"
|
||||
class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ translate('Email') }}"
|
||||
name="email" id="email" autocomplete="off">
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button class="btn btn-primary btn-block" type="submit">
|
||||
{{ translate('Send Password Reset Link') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="mt-3">
|
||||
<a href="{{ route('user.login') }}"
|
||||
class="text-reset opacity-60">{{ translate('Back to Login') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
var isPhoneShown = true,
|
||||
countryData = window.intlTelInputGlobals.getCountryData(),
|
||||
input = document.querySelector("#phone-code");
|
||||
|
||||
for (var i = 0; i < countryData.length; i++) {
|
||||
var country = countryData[i];
|
||||
if (country.iso2 == 'bd') {
|
||||
country.dialCode = '88';
|
||||
}
|
||||
}
|
||||
|
||||
var iti = intlTelInput(input, {
|
||||
separateDialCode: true,
|
||||
utilsScript: "{{ static_asset('assets/js/intlTelutils.js') }}?1590403638580",
|
||||
onlyCountries: @php
|
||||
echo json_encode(
|
||||
\App\Models\Country::where('status', 1)
|
||||
->pluck('code')
|
||||
->toArray(),
|
||||
);
|
||||
@endphp,
|
||||
customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {
|
||||
if (selectedCountryData.iso2 == 'bd') {
|
||||
return "01xxxxxxxxx";
|
||||
}
|
||||
return selectedCountryPlaceholder;
|
||||
}
|
||||
});
|
||||
|
||||
var country = iti.getSelectedCountryData();
|
||||
$('input[name=country_code]').val(country.dialCode);
|
||||
|
||||
input.addEventListener("countrychange", function(e) {
|
||||
// var currentMask = e.currentTarget.placeholder;
|
||||
|
||||
var country = iti.getSelectedCountryData();
|
||||
$('input[name=country_code]').val(country.dialCode);
|
||||
|
||||
});
|
||||
|
||||
function toggleEmailPhone(el) {
|
||||
if (isPhoneShown) {
|
||||
$('.phone-form-group').addClass('d-none');
|
||||
$('.email-form-group').removeClass('d-none');
|
||||
$('input[name=phone]').val(null);
|
||||
isPhoneShown = false;
|
||||
$(el).html('<i>*{{ translate('Use Phone Number Instead') }}</i>');
|
||||
} else {
|
||||
$('.phone-form-group').removeClass('d-none');
|
||||
$('.email-form-group').addClass('d-none');
|
||||
$('input[name=email]').val(null);
|
||||
isPhoneShown = true;
|
||||
$(el).html('<i>*{{ translate('Use Email Instead') }}</i>');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
59
resources/views/auth/passwords/reset.blade.php
Normal file
59
resources/views/auth/passwords/reset.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="py-6">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xxl-5 col-xl-6 col-md-8 mx-auto">
|
||||
<div class="bg-white rounded shadow-sm p-4 text-left">
|
||||
<h1 class="h3 fw-600">{{ translate('Reset Password') }}</h1>
|
||||
<p class="mb-4 opacity-60">{{translate('Enter your email address and new password and confirm password.')}} </p>
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ $email ?? old('email') }}" placeholder="{{ translate('Email') }}" required autofocus>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input id="code" type="text" class="form-control{{ $errors->has('code') ? ' is-invalid' : '' }}" name="code" value="{{ $email ?? old('code') }}" placeholder="{{translate('Code')}}" required autofocus>
|
||||
|
||||
@if ($errors->has('code'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('code') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="{{ translate('New Password') }}" required>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="{{ translate('Confirm Password') }}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
{{ translate('Reset Password') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
64
resources/views/auth/register.blade.php
Normal file
64
resources/views/auth/register.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('backend.layouts.blank')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="h-100 bg-cover bg-center py-5 d-flex align-items-center" style="background-image: url({{ uploaded_asset(get_setting('admin_login_background')) }})">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xl-4 mx-auto">
|
||||
<div class="card text-left">
|
||||
<div class="card-header">{{ translate('Create a New Account') }}</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('register') }}">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<input id="name" type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" name="name" value="{{ old('name') }}" required autofocus placeholder="{{ translate('Full Name') }}">
|
||||
|
||||
@if ($errors->has('name'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required placeholder="{{ translate('password') }}">
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required placeholder="{{ translate('Email') }}">
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required placeholder="{{ translate('Confrim Password') }}">
|
||||
</div>
|
||||
<div class="checkbox pad-btm text-left">
|
||||
<input id="demo-form-checkbox" class="magic-checkbox" type="checkbox" required>
|
||||
<label for="demo-form-checkbox">{{translate('I agree with the Terms and Conditions')}}</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
||||
{{ translate('Register') }}
|
||||
</button>
|
||||
</form>
|
||||
<div class="mt-3">
|
||||
{{translate('Already have an account')}} ? <a href="{{route('login')}}" class="btn-link mar-rgt text-bold">{{translate('Sign In')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
25
resources/views/auth/verify.blade.php
Normal file
25
resources/views/auth/verify.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('frontend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="py-6">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xxl-5 col-xl-6 col-md-8 mx-auto">
|
||||
<div class="bg-white rounded shadow-sm p-4 text-left">
|
||||
<h1 class="h3 fw-600 mb-3">{{ translate('Verify Your Email Address') }}</h1>
|
||||
<p class="opacity-60">
|
||||
{{ translate('Before proceeding, please check your email for a verification link.') }}
|
||||
{{ translate('If you did not receive the email.') }}
|
||||
</p>
|
||||
<a href="{{ route('verification.resend') }}" class="btn btn-primary btn-block">{{ translate('Click here to request another') }}</a>
|
||||
@if (session('resent'))
|
||||
<div class="alert alert-success mt-2 mb-0" role="alert">
|
||||
{{ translate('A fresh verification link has been sent to your email address.') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
40
resources/views/backend/addons/create.blade.php
Normal file
40
resources/views/backend/addons/create.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-7 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Install/Update Addon')}}</h5>
|
||||
</div>
|
||||
<form class="form-horizontal" action="{{ route('addons.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="purchase_code">{{ translate('Purchase code')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="purchase_code" name="purchase_code" class="form-control" autocomplete="off" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="addon_zip">{{ translate('Zip File')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="custom-file">
|
||||
<label class="custom-file-label">
|
||||
<input type="file" id="addon_zip" name="addon_zip" class="custom-file-input" required>
|
||||
<span class="custom-file-name">{{ translate('Choose file') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Install/Update')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
145
resources/views/backend/addons/index.blade.php
Normal file
145
resources/views/backend/addons/index.blade.php
Normal file
@@ -0,0 +1,145 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="">
|
||||
<div class="row ">
|
||||
<div class="col-md-6">
|
||||
<div class="nav border-bottom aiz-nav-tabs">
|
||||
<a class="p-3 fs-16 text-reset show active" data-toggle="tab" href="#installed">{{ translate('Installed Addon')}}</a>
|
||||
<a class="p-3 fs-16 text-reset" data-toggle="tab" href="#available">{{ translate('Available Addon')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col mt-3 mt-sm-0 text-center text-md-right">
|
||||
<a href="https://activeitzone.com/activation/addon" class="btn btn-primary" target="_blank">
|
||||
{{ translate('Activate Addon Link') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto mt-3 mt-sm-0 text-center text-md-right">
|
||||
<a href="{{ route('addons.create')}}" class="btn btn-primary">{{ translate('Install/Update Addon')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active show" id="installed">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
@forelse($addons as $key => $addon)
|
||||
<li class="list-group-item">
|
||||
<div class="align-items-center d-flex flex-column flex-md-row">
|
||||
<img class="h-60px mb-3 mb-md-0" src="{{ static_asset($addon->image) }}" alt="Image">
|
||||
<div class="mr-md-3 ml-md-5">
|
||||
<h4 class="fs-16 fw-600">{{ ucfirst($addon->name) }}</h4>
|
||||
</div>
|
||||
<div class="mr-md-3 ml-0">
|
||||
<p><small>{{ translate('Version')}}: </small>{{ $addon->version }}</p>
|
||||
</div>
|
||||
@if (env('DEMO_MODE') != 'On')
|
||||
<div class="mr-md-3 ml-0">
|
||||
<p><small>{{ translate('Purchase code')}}: </small>{{ $addon->purchase_code }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<div class="ml-auto mr-0">
|
||||
<label class="aiz-switch mb-0">
|
||||
<input type="checkbox" onchange="updateStatus(this, {{ $addon->id }})" <?php if($addon->activated) echo "checked";?>>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@empty
|
||||
<li class="list-group-item">
|
||||
<div class="text-center">
|
||||
<img class="mw-100 h-200px" src="{{ static_asset('assets/img/nothing.svg') }}" alt="Image">
|
||||
<h5 class="mb-0 h5 mt-3">{{ translate('No Addon Installed')}}</h5>
|
||||
</div>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="available">
|
||||
<div class="row" id="available-addons-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function updateStatus(el, id){
|
||||
if($(el).is(':checked')){
|
||||
var status = 1;
|
||||
}
|
||||
else{
|
||||
var status = 0;
|
||||
}
|
||||
$.post('{{ route('addons.activation') }}', {_token:'{{ csrf_token() }}', id:id, status:status}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Status updated successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$.post('https://activeitzone.com/addons/public/addons', {item: 'ecommerce'}, function(data){
|
||||
//console.log(data);
|
||||
html = '';
|
||||
data.forEach((item, i) => {
|
||||
if(item.link != null){
|
||||
html += `<div class="col-lg-4 col-md-6 ">
|
||||
<div class="card addon-card">
|
||||
<div class="card-body">
|
||||
<a href="${item.link}" target="_blank"><img class="img-fluid" src="${item.image}"></a>
|
||||
<div class="pt-4">
|
||||
<a class="fs-16 fw-600 text-reset" href="${item.link}" target="_blank">${item.name}</a>
|
||||
<div class="rating mb-2"><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i></div>
|
||||
<p class="mar-no text-truncate-3">${item.short_description}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="text-danger fs-22 fw-600">$${item.price}</div>
|
||||
<div class=""><a href="${item.link}" target="_blank" class="btn btn-sm btn-secondary">Preview</a> <a href="${item.purchase}" target="_blank" class="btn btn-sm btn-primary">Purchase</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
else {
|
||||
html += `<div class="col-lg-4 col-md-6 ">
|
||||
<div class="card addon-card">
|
||||
<div class="card-body">
|
||||
<a><img class="img-fluid" src="${item.image}"></a>
|
||||
<div class="pt-4">
|
||||
<a class="fs-16 fw-600 text-reset" >${item.name}</a>
|
||||
<div class="rating mb-2"><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i><i class="la la-star active"></i></div>
|
||||
<p class="mar-no text-truncate-3">${item.short_description}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="text-center"><div class="btn btn-outline btn-primary">Coming Soon</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
});
|
||||
$('#available-addons-content').html(html);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
60
resources/views/backend/admin_profile/index.blade.php
Normal file
60
resources/views/backend/admin_profile/index.blade.php
Normal file
@@ -0,0 +1,60 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Profile')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('profile.update', Auth::user()->id) }}" method="POST" enctype="multipart/form-data">
|
||||
<input name="_method" type="hidden" value="PATCH">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Name')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="{{translate('Name')}}" name="name" value="{{ Auth::user()->name }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Email')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="email" class="form-control" placeholder="{{translate('Email')}}" name="email" value="{{ Auth::user()->email }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="new_password">{{translate('New Password')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" placeholder="{{translate('New Password')}}" name="new_password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="confirm_password">{{translate('Confirm Password')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" placeholder="{{translate('Confirm Password')}}" name="confirm_password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Avatar')}} <small>(90x90)</small></label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="avatar" class="selected-files" value="{{ Auth::user()->avatar_original }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
151
resources/views/backend/blog_system/blog/create.blade.php
Normal file
151
resources/views/backend/blog_system/blog/create.blade.php
Normal file
@@ -0,0 +1,151 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Blog Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="add_form" class="form-horizontal" action="{{ route('blog.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Blog Title')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Blog Title')}}" onkeyup="makeSlug(this.value)" id="title" name="title" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-md-3 col-from-label">
|
||||
{{translate('Category')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control aiz-selectpicker" name="category_id" id="category_id" data-live-search="true" required>
|
||||
<option>--</option>
|
||||
@foreach ($blog_categories as $category)
|
||||
<option value="{{ $category->id }}">
|
||||
{{ $category->category_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Slug')}}
|
||||
<span class="text-danger">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Slug')}}" name="slug" id="slug" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">
|
||||
{{translate('Banner')}}
|
||||
<small>(1300x650)</small>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="banner" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Short Description')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="short_description" rows="5" class="form-control" required=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">
|
||||
{{translate('Description')}}
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<textarea class="aiz-text-editor" name="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" name="meta_title" placeholder="{{translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">
|
||||
{{translate('Meta Image')}}
|
||||
<small>(200x200)+</small>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Meta Description')}}</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="meta_description" rows="5" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Meta Keywords')}}
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="meta_keywords" name="meta_keywords" placeholder="{{translate('Meta Keywords')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{translate('Save')}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function makeSlug(val) {
|
||||
let str = val;
|
||||
let output = str.replace(/\s+/g, '-').toLowerCase();
|
||||
$('#slug').val(output);
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
160
resources/views/backend/blog_system/blog/edit.blade.php
Normal file
160
resources/views/backend/blog_system/blog/edit.blade.php
Normal file
@@ -0,0 +1,160 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Blog Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="add_form" class="form-horizontal" action="{{ route('blog.update',$blog->id) }}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Blog Title')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Blog Title')}}" onkeyup="makeSlug(this.value)" id="title" name="title" value="{{ $blog->title }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="category">
|
||||
<label class="col-md-3 col-from-label">
|
||||
{{translate('Category')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<select
|
||||
class="form-control aiz-selectpicker"
|
||||
name="category_id"
|
||||
id="category_id"
|
||||
data-live-search="true"
|
||||
required
|
||||
@if($blog->category != null)
|
||||
data-selected="{{ $blog->category->id }}"
|
||||
@endif
|
||||
>
|
||||
<option>--</option>
|
||||
@foreach ($blog_categories as $category)
|
||||
<option value="{{ $category->id }}">
|
||||
{{ $category->category_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Slug')}}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Slug')}}" name="slug" id="slug" value="{{ $blog->slug }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">
|
||||
{{translate('Banner')}}
|
||||
<small>(1300x650)</small>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="banner" class="selected-files" value="{{ $blog->banner }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Short Description')}}
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="short_description" rows="5" class="form-control">{{ $blog->short_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-from-label">
|
||||
{{translate('Description')}}
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<textarea class="aiz-text-editor" name="description">{{ $blog->description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" name="meta_title" value="{{ $blog->meta_title }}" placeholder="{{translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">
|
||||
{{translate('Meta Image')}}
|
||||
<small>(200x200)+</small>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">
|
||||
{{ translate('Browse')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files" value="{{ $blog->meta_img }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Meta Description')}}</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="meta_description" rows="5" class="form-control">{{ $blog->meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">
|
||||
{{translate('Meta Keywords')}}
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="meta_keywords" name="meta_keywords" value="{{ $blog->meta_keywords }}" placeholder="{{translate('Meta Keywords')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{translate('Save')}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function makeSlug(val) {
|
||||
let str = val;
|
||||
let output = str.replace(/\s+/g, '-').toLowerCase();
|
||||
$('#slug').val(output);
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
125
resources/views/backend/blog_system/blog/index.blade.php
Normal file
125
resources/views/backend/blog_system/blog/index.blade.php
Normal file
@@ -0,0 +1,125 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('All Posts')}}</h1>
|
||||
</div>
|
||||
@can('add_blog')
|
||||
<div class="col text-right">
|
||||
<a href="{{ route('blog.create') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Add New Post')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="card">
|
||||
<form class="" id="sort_blogs" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col text-center text-md-left">
|
||||
<h5 class="mb-md-0 h6">{{ translate('All blog posts') }}</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control form-control-sm" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table class="table mb-0 aiz-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Title')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Category')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Short Description')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Status')}}</th>
|
||||
<th class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($blogs as $key => $blog)
|
||||
<tr>
|
||||
<td>
|
||||
{{ ($key+1) + ($blogs->currentPage() - 1) * $blogs->perPage() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $blog->title }}
|
||||
</td>
|
||||
<td>
|
||||
@if($blog->category != null)
|
||||
{{ $blog->category->category_name }}
|
||||
@else
|
||||
--
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $blog->short_description }}
|
||||
</td>
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox"
|
||||
@can('publish_blog') onchange="change_status(this)" @endcan
|
||||
value="{{ $blog->id }}"
|
||||
<?php if($blog->status == 1) echo "checked";?>
|
||||
@cannot('publish_blog') disabled @endcan
|
||||
>
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@can('edit_blog')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{ route('blog.edit',$blog->id)}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-pen"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_blog')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('blog.destroy', $blog->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $blogs->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_status(el){
|
||||
var status = 0;
|
||||
if(el.checked){
|
||||
var status = 1;
|
||||
}
|
||||
$.post('{{ route('blog.change-status') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Change blog status successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,31 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Blog Category Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="POST" action="{{ route('blog-category.store') }}">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Name')}}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Name')}}" id="category_name" name="category_name" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{translate('Save')}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
33
resources/views/backend/blog_system/category/edit.blade.php
Normal file
33
resources/views/backend/blog_system/category/edit.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Blog Category Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="add_form" class="form-horizontal" action="{{ route('blog-category.update', $cateogry->id) }}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">{{translate('Name')}}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="{{translate('Name')}}" id="category_name" name="category_name" value="{{ $cateogry->category_name }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{translate('Save')}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
70
resources/views/backend/blog_system/category/index.blade.php
Normal file
70
resources/views/backend/blog_system/category/index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{translate('All Blog Categories')}}</h1>
|
||||
</div>
|
||||
@can('add_blog_category')
|
||||
<div class="col-md-6 text-md-right">
|
||||
<a href="{{ url('admin/blog-category/create') }}" class="btn btn-primary">
|
||||
<span>{{translate('Add New category')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header d-block d-md-flex">
|
||||
<h5 class="mb-0 h6">{{ translate('Blog Categories') }}</h5>
|
||||
<form class="" id="sort_categories" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 200px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">#</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th width="10%" class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $key => $category)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($categories->currentPage() - 1)*$categories->perPage() }}</td>
|
||||
<td>{{ $category->category_name }}</td>
|
||||
<td class="text-right">
|
||||
@can('edit_blog_category')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{url('admin/blog-category/'.$category->id.'/edit')}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_blog_category')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('blog-category.destroy', $category->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $categories->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Classified Products')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Image')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Uploaded By')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Customer Status')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Published')}}</th>
|
||||
<th class="text-right" width="10%">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($products as $key => $product)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($products->currentPage() - 1)*$products->perPage() }}</td>
|
||||
<td><a href="{{ route('customer.product', $product->slug) }}" class="text-reset text-truncate-2" target="_blank">{{$product->getTranslation('name')}}</a></td>
|
||||
<td><img src="{{ uploaded_asset($product->thumbnail_img) }}" alt="{{translate('Product Image')}}" class="h-50px"></td>
|
||||
<td>{{$product->added_by}}</td>
|
||||
<td>
|
||||
@if ($product->status == 1)
|
||||
<span class="badge badge-inline badge-success">{{ translate('PUBLISHED') }}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-danger">{{ translate('UNPUBLISHED') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input
|
||||
@can('publish_classified_product') onchange="update_published(this)" @endcan
|
||||
value="{{ $product->id }}" type="checkbox" <?php if($product->published == 1) echo "checked";?>
|
||||
@if(!auth()->user()->can('publish_classified_product')) disabled @endif
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('customer.product', $product->slug)}}" title="{{ translate('Show') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
@can('delete_classified_product')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('classified_products.destroy', $product->id)}}}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $products->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">s
|
||||
|
||||
function update_published(el){
|
||||
if(el.checked){
|
||||
var status = 1;
|
||||
}
|
||||
else{
|
||||
var status = 0;
|
||||
}
|
||||
$.post('{{ route('classified_products.published') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Published products updated successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,54 @@
|
||||
@extends('backend.layouts.app')
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Create New Package')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('customer_packages.store') }}" method="POST" >
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Package Name')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('Name')}}" id="name" name="name" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Amount')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" lang="en" min="0" step="0.01" placeholder="{{translate('Amount')}}" id="amount" name="amount" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Product Upload')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" lang="en" min="0" step="1" placeholder="{{translate('Product Upload')}}" id="product_upload" name="product_upload" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Package logo')}}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="logo" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,69 @@
|
||||
@extends('backend.layouts.app')
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="align-items-center">
|
||||
<h1 class="h3">{{translate('Update Package Information')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-body p-0">
|
||||
<ul class="nav nav-tabs nav-fill border-light">
|
||||
@foreach (\App\Models\Language::all() as $key => $language)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-reset @if ($language->code == $lang) active @else bg-soft-dark border-light border-left-0 @endif py-3" href="{{ route('customer_packages.edit', ['id'=>$customer_package->id, 'lang'=> $language->code] ) }}">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" height="11" class="mr-1">
|
||||
<span>{{$language->name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<form class="p-4" action="{{ route('customer_packages.update', $customer_package->id) }}" method="POST">
|
||||
<input type="hidden" name="_method" value="PATCH">
|
||||
<input type="hidden" name="lang" value="{{ $lang }}">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label">{{translate('Package Name')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('Name')}}" id="name" name="name" value="{{ $customer_package->getTranslation('name', $lang) }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label">{{translate('Amount')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" lang="en" min="0" step="0.01" placeholder="{{translate('Amount')}}" value="{{ $customer_package->amount }}" id="amount" name="amount" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label">{{translate('Product Upload')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" lang="en" min="0" step="1" placeholder="{{translate('Product Upload')}}" value="{{ $customer_package->product_upload }}" id="product_upload" name="product_upload" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Package logo')}}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="logo" value="{{$customer_package->logo}}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,47 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{translate('All Classifies Packages')}}</h1>
|
||||
</div>
|
||||
@can('add_classified_package')
|
||||
<div class="col-md-6 text-md-right">
|
||||
<a href="{{ route('customer_packages.create') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Add New Package')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($customer_packages as $key => $customer_package)
|
||||
<div class="col-lg-3 col-md-4 col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<img alt="{{ translate('Package Logo')}}" src="{{ uploaded_asset($customer_package->logo) }}" class="mw-100 mx-auto mb-4" height="150px">
|
||||
<p class="mb-3 h6 fw-600">{{$customer_package->getTranslation('name')}}</p>
|
||||
<p class="h4">{{single_price($customer_package->amount)}}</p>
|
||||
<p class="fs-15">{{translate('Product Upload') }}:
|
||||
<span class="text-bold">{{$customer_package->product_upload}}</span>
|
||||
</p>
|
||||
<div class="mar-top">
|
||||
@can('edit_classified_package')
|
||||
<a href="{{route('customer_packages.edit', ['id'=>$customer_package->id, 'lang'=>env('DEFAULT_LANGUAGE')] )}}" class="btn btn-sm btn-info">{{translate('Edit')}}</a>
|
||||
@endcan
|
||||
@can('delete_classified_package')
|
||||
<a href="#" data-href="{{route('customer_packages.destroy', $customer_package->id)}}" class="btn btn-sm btn-danger confirm-delete" >{{translate('Delete')}}</a>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
214
resources/views/backend/customer/customers/index.blade.php
Normal file
214
resources/views/backend/customer/customers/index.blade.php
Normal file
@@ -0,0 +1,214 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="align-items-center">
|
||||
<h1 class="h3">{{translate('All Customers')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<form class="" id="sort_customers" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-0 h6">{{translate('Customers')}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="dropdown mb-2 mb-md-0">
|
||||
<button class="btn border dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
{{translate('Bulk Action')}}
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item confirm-alert" href="javascript:void(0)" data-target="#bulk-delete-modal">{{translate('Delete selection')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-0">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type email or name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th data-breakpoints="lg">#</th>-->
|
||||
<th>
|
||||
<div class="form-group">
|
||||
<div class="aiz-checkbox-inline">
|
||||
<label class="aiz-checkbox">
|
||||
<input type="checkbox" class="check-all">
|
||||
<span class="aiz-square-check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Email Address')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Phone')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Package')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Wallet Balance')}}</th>
|
||||
<th class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($users as $key => $user)
|
||||
@if ($user != null)
|
||||
<tr>
|
||||
<!--<td>{{ ($key+1) + ($users->currentPage() - 1)*$users->perPage() }}</td>-->
|
||||
<td>
|
||||
<div class="form-group">
|
||||
<div class="aiz-checkbox-inline">
|
||||
<label class="aiz-checkbox">
|
||||
<input type="checkbox" class="check-one" name="id[]" value="{{$user->id}}">
|
||||
<span class="aiz-square-check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>@if($user->banned == 1) <i class="fa fa-ban text-danger" aria-hidden="true"></i> @endif {{$user->name}}</td>
|
||||
<td>{{$user->email}}</td>
|
||||
<td>{{$user->phone}}</td>
|
||||
<td>
|
||||
@if ($user->customer_package != null)
|
||||
{{$user->customer_package->getTranslation('name')}}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{single_price($user->balance)}}</td>
|
||||
<td class="text-right">
|
||||
@can('login_as_customer')
|
||||
<a href="{{route('customers.login', encrypt($user->id))}}" class="btn btn-soft-primary btn-icon btn-circle btn-sm" title="{{ translate('Log in as this Customer') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('ban_customer')
|
||||
@if($user->banned != 1)
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm" onclick="confirm_ban('{{route('customers.ban', encrypt($user->id))}}');" title="{{ translate('Ban this Customer') }}">
|
||||
<i class="las la-user-slash"></i>
|
||||
</a>
|
||||
@else
|
||||
<a href="#" class="btn btn-soft-success btn-icon btn-circle btn-sm" onclick="confirm_unban('{{route('customers.ban', encrypt($user->id))}}');" title="{{ translate('Unban this Customer') }}">
|
||||
<i class="las la-user-check"></i>
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
@can('delete_customer')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('customers.destroy', $user->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $users->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="confirm-ban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to ban this Customer?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmation" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="confirm-unban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to unban this Customer?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmationunban" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Delete modal -->
|
||||
@include('modals.delete_modal')
|
||||
<!-- Bulk Delete modal -->
|
||||
@include('modals.bulk_delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).on("change", ".check-all", function() {
|
||||
if(this.checked) {
|
||||
// Iterate each checkbox
|
||||
$('.check-one:checkbox').each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$('.check-one:checkbox').each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function sort_customers(el){
|
||||
$('#sort_customers').submit();
|
||||
}
|
||||
function confirm_ban(url)
|
||||
{
|
||||
$('#confirm-ban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmation').setAttribute('href' , url);
|
||||
}
|
||||
|
||||
function confirm_unban(url)
|
||||
{
|
||||
$('#confirm-unban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmationunban').setAttribute('href' , url);
|
||||
}
|
||||
|
||||
function bulk_delete() {
|
||||
var data = new FormData($('#sort_customers')[0]);
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
url: "{{route('bulk-customer-delete')}}",
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (response) {
|
||||
if(response == 1) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
390
resources/views/backend/dashboard.blade.php
Normal file
390
resources/views/backend/dashboard.blade.php
Normal file
@@ -0,0 +1,390 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
@if(auth()->user()->can('smtp_settings') && env('MAIL_USERNAME') == null && env('MAIL_PASSWORD') == null)
|
||||
<div class="">
|
||||
<div class="alert alert-danger d-flex align-items-center">
|
||||
{{translate('Please Configure SMTP Setting to work all email sending functionality')}},
|
||||
<a class="alert-link ml-2" href="{{ route('smtp_settings.index') }}">{{ translate('Configure Now') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@can('admin_dashboard')
|
||||
<div class="row gutters-10">
|
||||
<div class="col-lg-6">
|
||||
<div class="row gutters-10">
|
||||
<div class="col-6">
|
||||
<div class="bg-grad-2 text-white rounded-lg mb-4 overflow-hidden">
|
||||
<div class="px-3 pt-3">
|
||||
<div class="opacity-50">
|
||||
<span class="fs-12 d-block">{{ translate('Total') }}</span>
|
||||
{{ translate('Customer') }}
|
||||
</div>
|
||||
<div class="h3 fw-700 mb-3">
|
||||
{{ \App\Models\User::where('user_type', 'customer')->where('email_verified_at', '!=', null)->count() }}
|
||||
</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
|
||||
<path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="bg-grad-3 text-white rounded-lg mb-4 overflow-hidden">
|
||||
<div class="px-3 pt-3">
|
||||
<div class="opacity-50">
|
||||
<span class="fs-12 d-block">{{ translate('Total') }}</span>
|
||||
{{ translate('Order') }}
|
||||
</div>
|
||||
<div class="h3 fw-700 mb-3">{{ \App\Models\Order::count() }}</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
|
||||
<path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="bg-grad-1 text-white rounded-lg mb-4 overflow-hidden">
|
||||
<div class="px-3 pt-3">
|
||||
<div class="opacity-50">
|
||||
<span class="fs-12 d-block">{{ translate('Total') }}</span>
|
||||
{{ translate('Product category') }}
|
||||
</div>
|
||||
<div class="h3 fw-700 mb-3">{{ \App\Models\Category::count() }}</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
|
||||
<path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="bg-grad-4 text-white rounded-lg mb-4 overflow-hidden">
|
||||
<div class="px-3 pt-3">
|
||||
<div class="opacity-50">
|
||||
<span class="fs-12 d-block">{{ translate('Total') }}</span>
|
||||
{{ translate('Product brand') }}
|
||||
</div>
|
||||
<div class="h3 fw-700 mb-3">{{ \App\Models\Brand::count() }}</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
|
||||
<path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="row gutters-10">
|
||||
<div class="col-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0 fs-14">{{ translate('Products') }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="pie-1" class="w-100" height="305"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0 fs-14">{{ translate('Sellers') }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="pie-2" class="w-100" height="305"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-10">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0 fs-14">{{ translate('Category wise product sale') }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="graph-1" class="w-100" height="500"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0 fs-14">{{ translate('Category wise product stock') }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="graph-2" class="w-100" height="500"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0">{{ translate('Top 12 Products') }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="aiz-carousel gutters-10 half-outside-arrow" data-items="6" data-xl-items="5" data-lg-items="4" data-md-items="3" data-sm-items="2" data-arrows='true'>
|
||||
@foreach (filter_products(\App\Models\Product::where('published', 1)->orderBy('num_of_sale', 'desc'))->limit(12)->get() as $key => $product)
|
||||
<div class="carousel-box">
|
||||
<div class="aiz-card-box border border-light rounded shadow-sm hov-shadow-md mb-2 has-transition bg-white">
|
||||
<div class="position-relative">
|
||||
<a href="{{ route('product', $product->slug) }}" class="d-block">
|
||||
<img
|
||||
class="img-fit lazyload mx-auto h-210px"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($product->thumbnail_img) }}"
|
||||
alt="{{ $product->getTranslation('name') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
<div class="p-md-3 p-2 text-left">
|
||||
<div class="fs-15">
|
||||
@if(home_base_price($product) != home_discounted_base_price($product))
|
||||
<del class="fw-600 opacity-50 mr-1">{{ home_base_price($product) }}</del>
|
||||
@endif
|
||||
<span class="fw-700 text-primary">{{ home_discounted_base_price($product) }}</span>
|
||||
</div>
|
||||
<div class="rating rating-sm mt-1">
|
||||
{{ renderStarRating($product->rating) }}
|
||||
</div>
|
||||
<h3 class="fw-600 fs-13 text-truncate-2 lh-1-4 mb-0">
|
||||
<a href="{{ route('product', $product->slug) }}" class="d-block text-reset">{{ $product->getTranslation('name') }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
AIZ.plugins.chart('#pie-1',{
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
'{{translate('Total published products')}}',
|
||||
'{{translate('Total sellers products')}}',
|
||||
'{{translate('Total admin products')}}'
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
data: [
|
||||
{{ \App\Models\Product::where('published', 1)->count() }},
|
||||
{{ \App\Models\Product::where('published', 1)->where('added_by', 'seller')->count() }},
|
||||
{{ \App\Models\Product::where('published', 1)->where('added_by', 'admin')->count() }}
|
||||
],
|
||||
backgroundColor: [
|
||||
"#fd3995",
|
||||
"#34bfa3",
|
||||
"#5d78ff",
|
||||
'#fdcb6e',
|
||||
'#d35400',
|
||||
'#8e44ad',
|
||||
'#006442',
|
||||
'#4D8FAC',
|
||||
'#CA6924',
|
||||
'#C91F37'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
cutoutPercentage: 70,
|
||||
legend: {
|
||||
labels: {
|
||||
fontFamily: 'Poppins',
|
||||
boxWidth: 10,
|
||||
usePointStyle: true
|
||||
},
|
||||
onClick: function () {
|
||||
return '';
|
||||
},
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
AIZ.plugins.chart('#pie-2',{
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
'{{translate('Total sellers')}}',
|
||||
'{{translate('Total approved sellers')}}',
|
||||
'{{translate('Total pending sellers')}}'
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
data: [
|
||||
{{ \App\Models\Shop::count() }},
|
||||
{{ \App\Models\Shop::where('verification_status', 1)->count() }},
|
||||
{{ \App\Models\Shop::where('verification_status', 0)->count() }}
|
||||
],
|
||||
backgroundColor: [
|
||||
"#fd3995",
|
||||
"#34bfa3",
|
||||
"#5d78ff",
|
||||
'#fdcb6e',
|
||||
'#d35400',
|
||||
'#8e44ad',
|
||||
'#006442',
|
||||
'#4D8FAC',
|
||||
'#CA6924',
|
||||
'#C91F37'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
cutoutPercentage: 70,
|
||||
legend: {
|
||||
labels: {
|
||||
fontFamily: 'Montserrat',
|
||||
boxWidth: 10,
|
||||
usePointStyle: true
|
||||
},
|
||||
onClick: function () {
|
||||
return '';
|
||||
},
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
});
|
||||
AIZ.plugins.chart('#graph-1',{
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'{{ $category->getTranslation('name') }}',
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
label: '{{ translate('Number of sale') }}',
|
||||
data: [
|
||||
{{ $cached_graph_data['num_of_sale_data'] }}
|
||||
],
|
||||
backgroundColor: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'rgba(55, 125, 255, 0.4)',
|
||||
@endforeach
|
||||
],
|
||||
borderColor: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'rgba(55, 125, 255, 1)',
|
||||
@endforeach
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
gridLines: {
|
||||
color: '#f2f3f8',
|
||||
zeroLineColor: '#f2f3f8'
|
||||
},
|
||||
ticks: {
|
||||
fontColor: "#8b8b8b",
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 10,
|
||||
beginAtZero: true
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
color: '#f2f3f8'
|
||||
},
|
||||
ticks: {
|
||||
fontColor: "#8b8b8b",
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 10
|
||||
}
|
||||
}]
|
||||
},
|
||||
legend:{
|
||||
labels: {
|
||||
fontFamily: 'Poppins',
|
||||
boxWidth: 10,
|
||||
usePointStyle: true
|
||||
},
|
||||
onClick: function () {
|
||||
return '';
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
AIZ.plugins.chart('#graph-2',{
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'{{ $category->getTranslation('name') }}',
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
label: '{{ translate('Number of Stock') }}',
|
||||
data: [
|
||||
{{ $cached_graph_data['qty_data'] }}
|
||||
],
|
||||
backgroundColor: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'rgba(253, 57, 149, 0.4)',
|
||||
@endforeach
|
||||
],
|
||||
borderColor: [
|
||||
@foreach ($root_categories as $key => $category)
|
||||
'rgba(253, 57, 149, 1)',
|
||||
@endforeach
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
gridLines: {
|
||||
color: '#f2f3f8',
|
||||
zeroLineColor: '#f2f3f8'
|
||||
},
|
||||
ticks: {
|
||||
fontColor: "#8b8b8b",
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 10,
|
||||
beginAtZero: true
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
color: '#f2f3f8'
|
||||
},
|
||||
ticks: {
|
||||
fontColor: "#8b8b8b",
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 10
|
||||
}
|
||||
}]
|
||||
},
|
||||
legend:{
|
||||
labels: {
|
||||
fontFamily: 'Poppins',
|
||||
boxWidth: 10,
|
||||
usePointStyle: true
|
||||
},
|
||||
onClick: function () {
|
||||
return '';
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,134 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('All Cancel Request')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header d-block d-lg-flex">
|
||||
<h5 class="mb-0 h6">{{translate('Cancel Requests')}}</h5>
|
||||
<div class="">
|
||||
<!-- <form class="" id="sort_delivery_boys" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 250px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type email or name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Code')}}</th>
|
||||
<th>{{translate('Request By')}}</th>
|
||||
<th>{{translate('Request At')}}</th>
|
||||
<th class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($cancel_requests as $key => $cancel_request)
|
||||
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($cancel_requests->currentPage() - 1) * $cancel_requests->perPage() }}</td>
|
||||
<td>
|
||||
{{ $cancel_request->code }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $cancel_request->delivery_boy->name }}
|
||||
</td>
|
||||
<td>
|
||||
{{$cancel_request->cancel_request_at}}
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
|
||||
<a href="{{route('all_orders.show', encrypt($cancel_request->id))}}" class="btn btn-soft-info btn-icon btn-circle btn-sm" title="{{ translate('View') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $cancel_requests->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="confirm-ban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to ban this delivery_boy?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmation" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="confirm-unban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to unban this delivery_boy?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmationunban" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
function sort_delivery_boys(el){
|
||||
$('#sort_delivery_boys').submit();
|
||||
}
|
||||
function confirm_ban(url)
|
||||
{
|
||||
$('#confirm-ban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmation').setAttribute('href' , url);
|
||||
}
|
||||
|
||||
function confirm_unban(url)
|
||||
{
|
||||
$('#confirm-unban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmationunban').setAttribute('href' , url);
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
177
resources/views/backend/delivery_boys/create.blade.php
Normal file
177
resources/views/backend/delivery_boys/create.blade.php
Normal file
@@ -0,0 +1,177 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Delivery Boy Information')}}</h5>
|
||||
</div>
|
||||
|
||||
<form action="{{ route('delivery-boys.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="name">
|
||||
{{translate('Name')}} <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Name" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="email">
|
||||
{{translate('Email')}} <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="phone">
|
||||
{{translate('Phone')}} <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="phone" value="{{ old('phone') }}" placeholder="Phone" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="password">
|
||||
{{translate('Password')}} <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" placeholder="Password" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="type">
|
||||
{{translate('Country')}} <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control aiz-selectpicker" data-live-search="true" name="country_id" id="country_id" required>
|
||||
<option value="">{{translate('Select Country')}}</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}">
|
||||
{{ $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>{{ translate('State')}}</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control mb-3 aiz-selectpicker" data-live-search="true" name="state_id" required>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>{{ translate('City')}}</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control mb-3 aiz-selectpicker" data-live-search="true" name="city_id" required>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label" for="signinSrEmail">
|
||||
{{translate('Image')}}
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="false">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="avatar_original" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label">{{translate('Address')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" name="address"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
$(document).on('change', '[name=country_id]', function() {
|
||||
var country_id = $(this).val();
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
url: "{{route('get-state')}}",
|
||||
type: 'POST',
|
||||
data: {
|
||||
country_id : country_id
|
||||
},
|
||||
success: function (response) {
|
||||
var obj = JSON.parse(response);
|
||||
if(obj != '') {
|
||||
$('[name="state_id"]').html(obj);
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '[name=state_id]', function() {
|
||||
var state_id = $(this).val();
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
url: "{{route('get-city')}}",
|
||||
type: 'POST',
|
||||
data: {
|
||||
state_id: state_id
|
||||
},
|
||||
success: function (response) {
|
||||
var obj = JSON.parse(response);
|
||||
if(obj != '') {
|
||||
$('[name="city_id"]').html(obj);
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,357 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Payment Configuration') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('business_settings.update') }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="delivery_boy_payment_type">
|
||||
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{ translate('Monthly Salary') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="delivery_boy_payment_type" value="salary"
|
||||
@if (get_setting('delivery_boy_payment_type') == 'salary') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="salary_div" style="display: none;">
|
||||
<label class="col-sm-4 col-from-label">{{ translate('Salary Amount') }}</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="types[]" value="delivery_boy_salary">
|
||||
<div class="input-group">
|
||||
<input type="number" name="delivery_boy_salary" class="form-control"
|
||||
value="{{ get_setting('delivery_boy_salary') ? get_setting('delivery_boy_salary') : '0' }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">
|
||||
{{ \App\Models\Currency::find(get_setting('system_default_currency'))->code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{ translate('Per Order Commission') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="radio" name="delivery_boy_payment_type" value="commission"
|
||||
@if (get_setting('delivery_boy_payment_type') == 'commission') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="commission_div" style="display: none;">
|
||||
<label class="col-sm-4 col-from-label">{{ translate('Commission Rate') }}</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="types[]" value="delivery_boy_commission">
|
||||
<div class="input-group">
|
||||
<input type="number" name="delivery_boy_commission" class="form-control"
|
||||
value="{{ get_setting('delivery_boy_commission') ? get_setting('delivery_boy_commission') : '0' }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupPrepend">
|
||||
{{ \App\Models\Currency::find(get_setting('system_default_currency'))->code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Update') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Notification Configuration') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('business_settings.update') }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="delivery_boy_mail_notification">
|
||||
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{ translate('Send Mail') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="delivery_boy_mail_notification" value="1"
|
||||
@if (get_setting('delivery_boy_mail_notification') == '1') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="delivery_boy_otp_notification">
|
||||
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{ translate('Send OTP') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" name="delivery_boy_otp_notification" value="1"
|
||||
@if (get_setting('delivery_boy_otp_notification') == '1') checked @endif>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Update') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Pickup Location For Delivery Boy') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('business_settings.update') }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if (get_setting('google_map') == 1)
|
||||
<div class="row">
|
||||
<input id="searchInput" class="controls" type="text"
|
||||
placeholder="{{ translate('Enter a location') }}">
|
||||
<div id="map"></div>
|
||||
<ul id="geoData">
|
||||
<li style="display: none;">Full Address: <span id="location"></span></li>
|
||||
<li style="display: none;">Postal Code: <span id="postal_code"></span></li>
|
||||
<li style="display: none;">Country: <span id="country"></span></li>
|
||||
<li style="display: none;">Latitude: <span id="lat"></span></li>
|
||||
<li style="display: none;">Longitude: <span id="lon"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-2" id="">
|
||||
<label for="exampleInputuname">Longitude</label>
|
||||
</div>
|
||||
<div class="col-md-10" id="">
|
||||
<input type="hidden" name="types[]" value="delivery_pickup_longitude">
|
||||
<input type="text" class="form-control mb-3" id="longitude"
|
||||
name="delivery_pickup_longitude" readonly=""
|
||||
value="{{ get_setting('delivery_pickup_longitude') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-2" id="">
|
||||
<label for="exampleInputuname">Latitude</label>
|
||||
</div>
|
||||
<div class="col-md-10" id="">
|
||||
<input type="hidden" name="types[]" value="delivery_pickup_latitude">
|
||||
<input type="text" class="form-control mb-3" id="latitude"
|
||||
name="delivery_pickup_latitude" readonly=""
|
||||
value="{{ get_setting('delivery_pickup_latitude') }}">
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="form-group row">
|
||||
<div class="col-md-2" id="">
|
||||
<label for="exampleInputuname">Longitude</label>
|
||||
</div>
|
||||
<div class="col-md-10" id="">
|
||||
<input type="hidden" name="types[]" value="delivery_pickup_longitude">
|
||||
<input type="text" class="form-control mb-3" id="longitude"
|
||||
name="delivery_pickup_longitude"
|
||||
value="{{ get_setting('delivery_pickup_longitude') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-2" id="">
|
||||
<label for="exampleInputuname">Latitude</label>
|
||||
</div>
|
||||
<div class="col-md-10" id="">
|
||||
<input type="hidden" name="types[]" value="delivery_pickup_latitude">
|
||||
<input type="text" class="form-control mb-3" id="latitude"
|
||||
name="delivery_pickup_latitude"
|
||||
value="{{ get_setting('delivery_pickup_latitude') }}">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Update') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
"use strict";
|
||||
$(document).ready(function() {
|
||||
show_hide_div();
|
||||
})
|
||||
|
||||
$("[name=delivery_boy_payment_type]").on("change", function() {
|
||||
show_hide_div();
|
||||
});
|
||||
|
||||
function show_hide_div() {
|
||||
$("#salary_div").hide();
|
||||
$("#commission_div").hide();
|
||||
if ($("[name=delivery_boy_payment_type]:checked").val() == 'salary') {
|
||||
$("#salary_div").show();
|
||||
}
|
||||
if ($("[name=delivery_boy_payment_type]:checked").val() == 'commission') {
|
||||
$("#commission_div").show();
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
@if (get_setting('google_map') == 1)
|
||||
<script>
|
||||
let default_longtitude = "{{ get_setting('google_map_longtitude') }}";
|
||||
let default_latitude = "{{ get_setting('google_map_latitude') }}";
|
||||
|
||||
function initialize(lat = -33.8688, lang = 151.2195, id_format = '') {
|
||||
|
||||
var long = lang;
|
||||
var lat = lat;
|
||||
if (default_longtitude != '' && default_latitude != '') {
|
||||
long = default_longtitude;
|
||||
lat = default_latitude;
|
||||
}
|
||||
|
||||
@if (get_setting('delivery_pickup_latitude'))
|
||||
long = {{ get_setting('delivery_pickup_longitude') }};
|
||||
lat = {{ get_setting('delivery_pickup_latitude') }};
|
||||
@endif
|
||||
|
||||
var map = new google.maps.Map(document.getElementById(id_format + 'map'), {
|
||||
center: {
|
||||
lat: lat,
|
||||
lng: long
|
||||
},
|
||||
zoom: 13
|
||||
});
|
||||
|
||||
var myLatlng = new google.maps.LatLng(lat, long);
|
||||
|
||||
var input = document.getElementById(id_format + 'searchInput');
|
||||
// console.log(input);
|
||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
||||
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
|
||||
autocomplete.bindTo('bounds', map);
|
||||
|
||||
var infowindow = new google.maps.InfoWindow();
|
||||
var marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: myLatlng,
|
||||
anchorPoint: new google.maps.Point(0, -29),
|
||||
draggable: true,
|
||||
});
|
||||
|
||||
map.addListener('click', function(event) {
|
||||
marker.setPosition(event.latLng);
|
||||
document.getElementById(id_format + 'latitude').value = event.latLng.lat();
|
||||
document.getElementById(id_format + 'longitude').value = event.latLng.lng();
|
||||
infowindow.setContent('Latitude: ' + event.latLng.lat() + '<br>Longitude: ' + event.latLng.lng());
|
||||
infowindow.open(map, marker);
|
||||
});
|
||||
|
||||
google.maps.event.addListener(marker, 'dragend', function(event) {
|
||||
document.getElementById(id_format + 'latitude').value = event.latLng.lat();
|
||||
document.getElementById(id_format + 'longitude').value = event.latLng.lng();
|
||||
infowindow.setContent('Latitude: ' + event.latLng.lat() + '<br>Longitude: ' + event.latLng.lng());
|
||||
infowindow.open(map, marker);
|
||||
});
|
||||
|
||||
autocomplete.addListener('place_changed', function() {
|
||||
infowindow.close();
|
||||
marker.setVisible(false);
|
||||
var place = autocomplete.getPlace();
|
||||
|
||||
if (!place.geometry) {
|
||||
window.alert("Autocomplete's returned place contains no geometry");
|
||||
return;
|
||||
}
|
||||
|
||||
// If the place has a geometry, then present it on a map.
|
||||
if (place.geometry.viewport) {
|
||||
map.fitBounds(place.geometry.viewport);
|
||||
} else {
|
||||
map.setCenter(place.geometry.location);
|
||||
map.setZoom(17);
|
||||
}
|
||||
/*
|
||||
marker.setIcon(({
|
||||
url: place.icon,
|
||||
size: new google.maps.Size(71, 71),
|
||||
origin: new google.maps.Point(0, 0),
|
||||
anchor: new google.maps.Point(17, 34),
|
||||
scaledSize: new google.maps.Size(35, 35)
|
||||
}));
|
||||
*/
|
||||
marker.setPosition(place.geometry.location);
|
||||
marker.setVisible(true);
|
||||
|
||||
var address = '';
|
||||
if (place.address_components) {
|
||||
address = [
|
||||
(place.address_components[0] && place.address_components[0].short_name || ''),
|
||||
(place.address_components[1] && place.address_components[1].short_name || ''),
|
||||
(place.address_components[2] && place.address_components[2].short_name || '')
|
||||
].join(' ');
|
||||
}
|
||||
|
||||
infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
|
||||
infowindow.open(map, marker);
|
||||
|
||||
//Location details
|
||||
for (var i = 0; i < place.address_components.length; i++) {
|
||||
if (place.address_components[i].types[0] == 'postal_code') {
|
||||
document.getElementById('postal_code').innerHTML = place.address_components[i].long_name;
|
||||
}
|
||||
if (place.address_components[i].types[0] == 'country') {
|
||||
document.getElementById('country').innerHTML = place.address_components[i].long_name;
|
||||
}
|
||||
}
|
||||
document.getElementById('location').innerHTML = place.formatted_address;
|
||||
document.getElementById(id_format + 'latitude').value = place.geometry.location.lat();
|
||||
document.getElementById(id_format + 'longitude').value = place.geometry.location.lng();
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script
|
||||
src="https://maps.googleapis.com/maps/api/js?key={{ env('MAP_API_KEY') }}&libraries=places&language=en&callback=initialize"
|
||||
async defer></script>
|
||||
@endif
|
||||
@endsection
|
||||
@@ -0,0 +1,61 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('All Collection List')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header d-block d-lg-flex">
|
||||
<h5 class="mb-0 h6">{{translate('Collection List')}}</h5>
|
||||
<div class="">
|
||||
<!-- <form class="" id="sort_delivery_boys" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 250px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type email or name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Delivery Boy')}}</th>
|
||||
<th class="text-center">{{translate('Collected Amount')}}</th>
|
||||
<th class="text-right">{{translate('Created At')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($delivery_boy_collections as $key => $delivery_boy_collection)
|
||||
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($delivery_boy_collections->currentPage() - 1) * $delivery_boy_collections->perPage() }}</td>
|
||||
<td>
|
||||
{{ $delivery_boy_collection->user->name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ $delivery_boy_collection->collection_amount }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{$delivery_boy_collection->created_at}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $delivery_boy_collections->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,62 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('All Payment List')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header d-block d-lg-flex">
|
||||
<h5 class="mb-0 h6">{{translate('Payment List')}}</h5>
|
||||
<div class="">
|
||||
<!-- <form class="" id="sort_delivery_boys" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 250px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type email or name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{translate('Delivery Boy')}}</th>
|
||||
<th class="text-center">{{translate('Payment Amount')}}</th>
|
||||
<th class="text-right">{{translate('Created At')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($delivery_boy_payments as $key => $delivery_boy_payment)
|
||||
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($delivery_boy_payments->currentPage() - 1) * $delivery_boy_payments->perPage() }}</td>
|
||||
<td>
|
||||
{{ $delivery_boy_payment->user->name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ $delivery_boy_payment->payment }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{$delivery_boy_payment->created_at}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $delivery_boy_payments->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="mb-0 h6">{{translate('Collection From Delivery Boy')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" action="{{ route('paid-to-delivery-boy') }}" method="POST" enctype="multipart/form-data">
|
||||
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Deliver Boy')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="hidden" name="delivery_boy_id" value="{{ $delivery_boy_info->user_id }}">
|
||||
<input type="text" class="form-control" value="{{ $delivery_boy_info->user->name }}" readonly="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Total Payable')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" value="{{ $delivery_boy_info->total_earning }}" readonly="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Paid Amount')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="number" class="form-control" id="paid_amount" name="paid_amount">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="payout_btn" class="btn btn-primary">{{ translate('Paid') }}</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
187
resources/views/backend/delivery_boys/edit.blade.php
Normal file
187
resources/views/backend/delivery_boys/edit.blade.php
Normal file
@@ -0,0 +1,187 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Delivery Boy Information')}}</h5>
|
||||
</div>
|
||||
|
||||
<form action="{{ route('delivery-boys.update', $delivery_boy->id) }}" method="POST">
|
||||
@csrf
|
||||
<input name="_method" type="hidden" value="PATCH">
|
||||
<div class="card-body">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="name">{{translate('Name')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="name" value="{{$delivery_boy->name}}" placeholder="Name" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="email">{{translate('Email')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="email" value="{{$delivery_boy->email}}" placeholder="Email" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="phone">{{translate('Phone')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="phone" value="{{$delivery_boy->phone}}" placeholder="Phone" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="password">{{translate('Password')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="country">
|
||||
{{translate('Country')}}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control aiz-selectpicker" name="country_id" id="country_id" required>
|
||||
<option value="">{{translate('Select Country')}}</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}" @if($delivery_boy->country == $country->name) selected @endif>
|
||||
{{ $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>{{ translate('State')}}</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control mb-3 aiz-selectpicker" name="state_id" id="edit_state" data-live-search="true" required>
|
||||
@foreach ($states as $key => $state)
|
||||
<option value="{{ $state->id }}" @if($delivery_boy->state == $state->name) selected @endif>
|
||||
{{ $state->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>{{ translate('City')}}</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control mb-3 aiz-selectpicker" data-live-search="true" name="city_id" required>
|
||||
@foreach ($cities as $key => $city)
|
||||
<option value="{{ $city->id }}" @if($delivery_boy->city == $city->name) selected @endif>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label" for="avatar_original">
|
||||
{{translate('Image')}}
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="false">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="avatar_original" value="{{ $delivery_boy->avatar_original }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label">{{translate('Address')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" name="address">{{ $delivery_boy->address }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
$(document).on('change', '[name=country_id]', function() {
|
||||
var country_id = $(this).val();
|
||||
get_states(country_id);
|
||||
});
|
||||
|
||||
$(document).on('change', '[name=state_id]', function() {
|
||||
var state_id = $(this).val();
|
||||
get_city(state_id);
|
||||
});
|
||||
|
||||
function get_states(country_id) {
|
||||
$('[name="state_id"]').html("");
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
url: "{{route('get-state')}}",
|
||||
type: 'POST',
|
||||
data: {
|
||||
country_id : country_id
|
||||
},
|
||||
success: function (response) {
|
||||
var obj = JSON.parse(response);
|
||||
if(obj != '') {
|
||||
$('[name="state_id"]').html(obj);
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function get_city(state_id) {
|
||||
$('[name="city_id"]').html("");
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
url: "{{route('get-city')}}",
|
||||
type: 'POST',
|
||||
data: {
|
||||
state_id: state_id
|
||||
},
|
||||
success: function (response) {
|
||||
var obj = JSON.parse(response);
|
||||
if(obj != '') {
|
||||
$('[name="city_id"]').html(obj);
|
||||
AIZ.plugins.bootstrapSelect('refresh');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
212
resources/views/backend/delivery_boys/index.blade.php
Normal file
212
resources/views/backend/delivery_boys/index.blade.php
Normal file
@@ -0,0 +1,212 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<h1 class="h3">{{translate('All Delivery Boys')}}</h1>
|
||||
</div>
|
||||
@can('add_delivery_boy')
|
||||
<div class="col text-right">
|
||||
<a href="{{ route('delivery-boys.create') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Add New Delivery Boy')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header d-block d-lg-flex">
|
||||
<h5 class="mb-0 h6">{{translate('Delivery Boys')}}</h5>
|
||||
<div class="">
|
||||
<form class="" id="sort_delivery_boys" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 250px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type email or name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Name')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Email Address')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Phone')}}</th>
|
||||
<th>{{translate('Earning')}}</th>
|
||||
<th>{{translate('Collection')}}</th>
|
||||
<th width="10%">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($delivery_boys as $key => $delivery_boy)
|
||||
@if ($delivery_boy->user != null)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($delivery_boys->currentPage() - 1)*$delivery_boys->perPage() }}</td>
|
||||
<td>@if($delivery_boy->user->banned == 1) <i class="las la-ban text-danger" aria-hidden="true"></i> @endif {{$delivery_boy->user->name}}</td>
|
||||
<td>{{$delivery_boy->user->email}}</td>
|
||||
<td>{{$delivery_boy->user->phone}}</td>
|
||||
<td>
|
||||
{{ single_price($delivery_boy->total_earning) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ single_price($delivery_boy->total_collection) }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn btn-sm btn-circle btn-soft-primary btn-icon dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<i class="las la-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-xs">
|
||||
@can('edit_delivery_boy')
|
||||
<a href="{{route('delivery-boys.edit', $delivery_boy->user->id)}}" class="dropdown-item">
|
||||
{{translate('Edit')}}
|
||||
</a>
|
||||
@endcan
|
||||
@can('ban_delivery_boy')
|
||||
@if($delivery_boy->user->banned != 1)
|
||||
<a href="#" onclick="confirm_ban('{{route('delivery-boy.ban', $delivery_boy->user->id)}}');" class="dropdown-item">
|
||||
{{translate('Ban this delivery boy')}}
|
||||
<i class="fa fa-ban text-danger" aria-hidden="true"></i>
|
||||
</a>
|
||||
@else
|
||||
<a href="#" onclick="confirm_unban('{{route('delivery-boy.ban', $delivery_boy->user->id)}}');" class="dropdown-item">
|
||||
{{translate('Unban this delivery boy')}}
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
@can('collect_from_delivery_boy')
|
||||
<a href="#" onclick="show_order_collection_modal('{{$delivery_boy->user->id}}');" class="dropdown-item">
|
||||
{{translate('Go to Collection')}}
|
||||
</a>
|
||||
@endcan
|
||||
@can('pay_to_delivery_boy')
|
||||
<a href="#" onclick="show_delivery_earning_modal('{{$delivery_boy->user->id}}');" class="dropdown-item">
|
||||
{{translate('Go to Payment')}}
|
||||
</a>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $delivery_boys->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="collection_modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="collection-modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="payment_modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="payment-modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="confirm-ban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to ban this delivery_boy?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmation" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="confirm-unban">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title h6">{{translate('Confirmation')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{translate('Do you really want to unban this delivery_boy?')}}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
<a type="button" id="confirmationunban" class="btn btn-primary">{{translate('Proceed!')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
})(jQuery);
|
||||
|
||||
function show_order_collection_modal(id){
|
||||
$.post('{{ route('delivery-boy.order-collection') }}',{
|
||||
_token :'{{ @csrf_token() }}',
|
||||
id :id
|
||||
}, function(data){
|
||||
$('#collection_modal #collection-modal-content').html(data);
|
||||
$('#collection_modal').modal('show', {backdrop: 'static'});
|
||||
});
|
||||
}
|
||||
|
||||
function show_delivery_earning_modal(id){
|
||||
$.post('{{ route('delivery-boy.delivery-earning') }}',{
|
||||
_token :'{{ @csrf_token() }}',
|
||||
id :id
|
||||
}, function(data){
|
||||
$('#payment_modal #payment-modal-content').html(data);
|
||||
$('#payment_modal').modal('show', {backdrop: 'static'});
|
||||
});
|
||||
}
|
||||
|
||||
function sort_delivery_boys(el){
|
||||
$('#sort_delivery_boys').submit();
|
||||
}
|
||||
function confirm_ban(url)
|
||||
{
|
||||
$('#confirm-ban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmation').setAttribute('href' , url);
|
||||
}
|
||||
|
||||
function confirm_unban(url)
|
||||
{
|
||||
$('#confirm-unban').modal('show', {backdrop: 'static'});
|
||||
document.getElementById('confirmationunban').setAttribute('href' , url);
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="mb-0 h6">{{translate('Collection From Delivery Boy')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" action="{{ route('collection-from-delivery-boy') }}" method="POST" enctype="multipart/form-data">
|
||||
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Deliver Boy')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="hidden" name="delivery_boy_id" value="{{ $delivery_boy_info->user_id }}">
|
||||
<input type="text" class="form-control" value="{{ $delivery_boy_info->user->name }}" readonly="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Collection From Delivery Boy')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" value="{{ $delivery_boy_info->total_collection }}" readonly="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-from-label">
|
||||
{{translate('Collected Amount')}}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<input type="number" class="form-control" id="payout_amount" name="payout_amount">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="payout_btn" class="btn btn-primary">{{ translate('Collection') }}</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
96
resources/views/backend/downloads/brand.blade.php
Normal file
96
resources/views/backend/downloads/brand.blade.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<div style="margin-left:auto;margin-right:auto;">
|
||||
<style media="all">
|
||||
@page {
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body{
|
||||
line-height: 1.5;
|
||||
font-family: 'DejaVuSans', 'sans-serif';
|
||||
color: #333542;
|
||||
}
|
||||
div{
|
||||
font-size: 1rem;
|
||||
}
|
||||
.gry-color *,
|
||||
.gry-color{
|
||||
color:#878f9c;
|
||||
}
|
||||
table{
|
||||
width: 100%;
|
||||
}
|
||||
table th{
|
||||
font-weight: normal;
|
||||
}
|
||||
table.padding th{
|
||||
padding: .5rem .7rem;
|
||||
}
|
||||
table.padding td{
|
||||
padding: .7rem;
|
||||
}
|
||||
table.sm-padding td{
|
||||
padding: .2rem .7rem;
|
||||
}
|
||||
.border-bottom td,
|
||||
.border-bottom th{
|
||||
border-bottom:1px solid #eceff4;
|
||||
}
|
||||
.text-left{
|
||||
text-align:left;
|
||||
}
|
||||
.text-right{
|
||||
text-align:right;
|
||||
}
|
||||
.small{
|
||||
font-size: .85rem;
|
||||
}
|
||||
.strong{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
$logo = get_setting('header_logo');
|
||||
@endphp
|
||||
|
||||
<div style="background: #eceff4;padding: 1.5rem;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@if($logo != null)
|
||||
<img src="{{ uploaded_asset($logo) }}" height="40" style="display:inline-block;">
|
||||
@else
|
||||
<img src="{{ static_asset('assets/img/logo.png') }}" height="40" style="display:inline-block;">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="border-bottom:1px solid #eceff4;margin: 0 1.5rem;"></div>
|
||||
|
||||
<div style="padding: 1.5rem;">
|
||||
<table class="padding text-left small border-bottom">
|
||||
<thead>
|
||||
<tr class="gry-color" style="background: #eceff4;">
|
||||
<th width="50%">{{translate('Brand Name') }}</th>
|
||||
<th width="50%">{{translate('ID') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="strong">
|
||||
@foreach ($brands as $key => $brand)
|
||||
<tr class="">
|
||||
<td>{{ $brand->getTranslation('name') }}</td>
|
||||
<td>{{ $brand->id }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
95
resources/views/backend/downloads/category.blade.php
Normal file
95
resources/views/backend/downloads/category.blade.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<div style="margin-left:auto;margin-right:auto;">
|
||||
<style media="all">
|
||||
@page {
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body{
|
||||
line-height: 1.5;
|
||||
font-family: 'DejaVuSans', 'sans-serif';
|
||||
color: #333542;
|
||||
}
|
||||
div{
|
||||
font-size: 1rem;
|
||||
}
|
||||
.gry-color *,
|
||||
.gry-color{
|
||||
color:#878f9c;
|
||||
}
|
||||
table{
|
||||
width: 100%;
|
||||
}
|
||||
table th{
|
||||
font-weight: normal;
|
||||
}
|
||||
table.padding th{
|
||||
padding: .5rem .7rem;
|
||||
}
|
||||
table.padding td{
|
||||
padding: .7rem;
|
||||
}
|
||||
table.sm-padding td{
|
||||
padding: .2rem .7rem;
|
||||
}
|
||||
.border-bottom td,
|
||||
.border-bottom th{
|
||||
border-bottom:1px solid #eceff4;
|
||||
}
|
||||
.text-left{
|
||||
text-align:left;
|
||||
}
|
||||
.text-right{
|
||||
text-align:right;
|
||||
}
|
||||
.small{
|
||||
font-size: .85rem;
|
||||
}
|
||||
.strong{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
$logo = get_setting('header_logo');
|
||||
@endphp
|
||||
|
||||
<div style="background: #eceff4;padding: 1.5rem;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@if($logo != null)
|
||||
<img src="{{ uploaded_asset($logo) }}" height="40" style="display:inline-block;">
|
||||
@else
|
||||
<img src="{{ static_asset('assets/img/logo.png') }}" height="40" style="display:inline-block;">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div style="border-bottom:1px solid #eceff4;margin: 0 1.5rem;"></div>
|
||||
|
||||
<div style="padding: 1.5rem;">
|
||||
<table class="padding text-left small border-bottom">
|
||||
<thead>
|
||||
<tr class="gry-color" style="background: #eceff4;">
|
||||
<th width="50%">{{translate('Category Name') }}</th>
|
||||
<th width="50%">{{translate('ID') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="strong">
|
||||
@foreach ($categories as $key => $category)
|
||||
<tr class="">
|
||||
<td>{{ $category->getTranslation('name') }}</td>
|
||||
<td>{{ $category->id }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
100
resources/views/backend/downloads/user.blade.php
Normal file
100
resources/views/backend/downloads/user.blade.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<div style="margin-left:auto;margin-right:auto;">
|
||||
<style media="all">
|
||||
@page {
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body{
|
||||
line-height: 1.5;
|
||||
font-family: 'DejaVuSans', 'sans-serif';
|
||||
color: #333542;
|
||||
}
|
||||
div{
|
||||
font-size: 1rem;
|
||||
}
|
||||
.gry-color *,
|
||||
.gry-color{
|
||||
color:#878f9c;
|
||||
}
|
||||
table{
|
||||
width: 100%;
|
||||
}
|
||||
table th{
|
||||
font-weight: normal;
|
||||
}
|
||||
table.padding th{
|
||||
padding: .5rem .7rem;
|
||||
}
|
||||
table.padding td{
|
||||
padding: .7rem;
|
||||
}
|
||||
table.sm-padding td{
|
||||
padding: .2rem .7rem;
|
||||
}
|
||||
.border-bottom td,
|
||||
.border-bottom th{
|
||||
border-bottom:1px solid #eceff4;
|
||||
}
|
||||
.text-left{
|
||||
text-align:left;
|
||||
}
|
||||
.text-right{
|
||||
text-align:right;
|
||||
}
|
||||
.small{
|
||||
font-size: .85rem;
|
||||
}
|
||||
.strong{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
$logo = get_setting('header_logo');
|
||||
@endphp
|
||||
|
||||
<div style="background: #eceff4;padding: 1.5rem;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@if($logo != null)
|
||||
<img src="{{ uploaded_asset($logo) }}" height="40" style="display:inline-block;">
|
||||
@else
|
||||
<img src="{{ static_asset('assets/img/logo.png') }}" height="40" style="display:inline-block;">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="border-bottom:1px solid #eceff4;margin: 0 1.5rem;"></div>
|
||||
|
||||
<div style="padding: 1.5rem;">
|
||||
<table class="padding text-left small border-bottom">
|
||||
<thead>
|
||||
<tr class="gry-color" style="background: #eceff4;">
|
||||
<th width="20%">{{translate('Type') }}</th>
|
||||
<th width="50%">{{translate('Name') }}</th>
|
||||
<th width="30%">{{translate('ID') }}</th>
|
||||
<th width="30%">{{translate('Email') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="strong">
|
||||
@foreach ($users as $key => $user)
|
||||
<tr class="">
|
||||
<td>{{ $user->user_type }}</td>
|
||||
<td>{{ $user->name }}</td>
|
||||
<td>{{ $user->id }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
156
resources/views/backend/inc/admin_nav.blade.php
Normal file
156
resources/views/backend/inc/admin_nav.blade.php
Normal file
@@ -0,0 +1,156 @@
|
||||
<div class="aiz-topbar px-15px px-lg-25px d-flex align-items-stretch justify-content-between">
|
||||
<div class="d-flex">
|
||||
<div class="aiz-topbar-nav-toggler d-flex align-items-center justify-content-start mr-2 mr-md-3 ml-0" data-toggle="aiz-mobile-nav">
|
||||
<button class="aiz-mobile-toggler">
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-stretch flex-grow-xl-1">
|
||||
<div class="d-flex justify-content-around align-items-center align-items-stretch">
|
||||
<div class="d-flex justify-content-around align-items-center align-items-stretch">
|
||||
<div class="aiz-topbar-item">
|
||||
<div class="d-flex align-items-center">
|
||||
<a class="btn btn-icon btn-circle btn-light" href="{{ route('home')}}" target="_blank" title="{{ translate('Browse Website') }}">
|
||||
<i class="las la-globe"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (addon_is_activated('pos_system') && auth()->user()->can('pos_manager'))
|
||||
<div class="d-flex justify-content-around align-items-center align-items-stretch ml-3">
|
||||
<div class="aiz-topbar-item">
|
||||
<div class="d-flex align-items-center">
|
||||
<a class="btn btn-icon btn-circle btn-light" href="{{ route('poin-of-sales.index') }}" target="_blank" title="{{ translate('POS') }}">
|
||||
<i class="las la-print"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="d-flex justify-content-around align-items-center align-items-stretch ml-3">
|
||||
<div class="aiz-topbar-item">
|
||||
<div class="d-flex align-items-center">
|
||||
<a class="btn btn-soft-danger btn-sm d-flex align-items-center" href="{{ route('cache.clear')}}">
|
||||
<i class="las la-hdd fs-20"></i>
|
||||
<span class="fw-500 ml-1 mr-0 d-none d-md-block">{{ translate('Clear Cache') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around align-items-center align-items-stretch">
|
||||
|
||||
<div class="aiz-topbar-item ml-2">
|
||||
<div class="align-items-stretch d-flex dropdown">
|
||||
<a class="dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<span class="btn btn-icon p-0 d-flex justify-content-center align-items-center">
|
||||
<span class="d-flex align-items-center position-relative">
|
||||
<i class="las la-bell fs-24"></i>
|
||||
@if(Auth::user()->unreadNotifications->count() > 0)
|
||||
<span class="badge badge-sm badge-dot badge-circle badge-primary position-absolute absolute-top-right"></span>
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-lg py-0">
|
||||
<div class="p-3 bg-light border-bottom">
|
||||
<h6 class="mb-0">{{ translate('Notifications') }}</h6>
|
||||
</div>
|
||||
<div class="px-3 c-scrollbar-light overflow-auto " style="max-height:300px;">
|
||||
<ul class="list-group list-group-flush">
|
||||
@forelse(Auth::user()->unreadNotifications->take(20) as $notification)
|
||||
<li class="list-group-item d-flex justify-content-between align-items- py-3">
|
||||
<div class="media text-inherit">
|
||||
<div class="media-body">
|
||||
@if($notification->type == 'App\Notifications\OrderNotification')
|
||||
<p class="mb-1 text-truncate-2">
|
||||
{{translate('Order code: ')}} {{$notification->data['order_code']}} {{ translate('has been '. ucfirst(str_replace('_', ' ', $notification->data['status'])))}}
|
||||
</p>
|
||||
<small class="text-muted">
|
||||
{{ date("F j Y, g:i a", strtotime($notification->created_at)) }}
|
||||
</small>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@empty
|
||||
<li class="list-group-item">
|
||||
<div class="py-4 text-center fs-16">
|
||||
{{ translate('No notification found') }}
|
||||
</div>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
<div class="text-center border-top">
|
||||
<a href="{{ route('admin.all-notification') }}" class="text-reset d-block py-2">
|
||||
{{translate('View All Notifications')}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- language --}}
|
||||
@php
|
||||
if(Session::has('locale')){
|
||||
$locale = Session::get('locale', Config::get('app.locale'));
|
||||
}
|
||||
else{
|
||||
$locale = env('DEFAULT_LANGUAGE');
|
||||
}
|
||||
@endphp
|
||||
<div class="aiz-topbar-item ml-2">
|
||||
<div class="align-items-stretch d-flex dropdown " id="lang-change">
|
||||
<a class="dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<span class="btn btn-icon">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$locale.'.png') }}" height="11">
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-xs">
|
||||
|
||||
@foreach (\App\Models\Language::where('status', 1)->get() as $key => $language)
|
||||
<li>
|
||||
<a href="javascript:void(0)" data-flag="{{ $language->code }}" class="dropdown-item @if($locale == $language->code) active @endif">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" class="mr-2">
|
||||
<span class="language">{{ $language->name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="aiz-topbar-item ml-2">
|
||||
<div class="align-items-stretch d-flex dropdown">
|
||||
<a class="dropdown-toggle no-arrow text-dark" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<span class="d-flex align-items-center">
|
||||
<span class="avatar avatar-sm mr-md-2">
|
||||
<img
|
||||
src="{{ uploaded_asset(Auth::user()->avatar_original) }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';"
|
||||
>
|
||||
</span>
|
||||
<span class="d-none d-md-block">
|
||||
<span class="d-block fw-500">{{Auth::user()->name}}</span>
|
||||
<span class="d-block small opacity-60">{{Auth::user()->user_type}}</span>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-md">
|
||||
<a href="{{ route('profile.index') }}" class="dropdown-item">
|
||||
<i class="las la-user-circle"></i>
|
||||
<span>{{translate('Profile')}}</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('logout')}}" class="dropdown-item">
|
||||
<i class="las la-sign-out-alt"></i>
|
||||
<span>{{translate('Logout')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .aiz-topbar-item -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .aiz-topbar -->
|
||||
1264
resources/views/backend/inc/admin_sidenav.blade.php
Normal file
1264
resources/views/backend/inc/admin_sidenav.blade.php
Normal file
File diff suppressed because it is too large
Load Diff
223
resources/views/backend/invoices/invoice.blade.php
Normal file
223
resources/views/backend/invoices/invoice.blade.php
Normal file
@@ -0,0 +1,223 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ translate('INVOICE') }}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta charset="UTF-8">
|
||||
<style media="all">
|
||||
@page {
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
body{
|
||||
font-size: 0.875rem;
|
||||
font-family: '<?php echo $font_family ?>';
|
||||
font-weight: normal;
|
||||
direction: <?php echo $direction ?>;
|
||||
text-align: <?php echo $text_align ?>;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
.gry-color *,
|
||||
.gry-color{
|
||||
color:#000;
|
||||
}
|
||||
table{
|
||||
width: 100%;
|
||||
}
|
||||
table th{
|
||||
font-weight: normal;
|
||||
}
|
||||
table.padding th{
|
||||
padding: .25rem .7rem;
|
||||
}
|
||||
table.padding td{
|
||||
padding: .25rem .7rem;
|
||||
}
|
||||
table.sm-padding td{
|
||||
padding: .1rem .7rem;
|
||||
}
|
||||
.border-bottom td,
|
||||
.border-bottom th{
|
||||
border-bottom:1px solid #eceff4;
|
||||
}
|
||||
.text-left{
|
||||
text-align:<?php echo $text_align ?>;
|
||||
}
|
||||
.text-right{
|
||||
text-align:<?php echo $not_text_align ?>;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
||||
@php
|
||||
$logo = get_setting('header_logo');
|
||||
@endphp
|
||||
|
||||
<div style="background: #eceff4;padding: 1rem;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@if($logo != null)
|
||||
<img src="{{ uploaded_asset($logo) }}" height="30" style="display:inline-block;">
|
||||
@else
|
||||
<img src="{{ static_asset('assets/img/logo.png') }}" height="30" style="display:inline-block;">
|
||||
@endif
|
||||
</td>
|
||||
<td style="font-size: 1.5rem;" class="text-right strong">{{ translate('INVOICE') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="font-size: 1rem;" class="strong">{{ get_setting('site_name') }}</td>
|
||||
<td class="text-right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gry-color small">{{ get_setting('contact_address') }}</td>
|
||||
<td class="text-right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gry-color small">{{ translate('Email') }}: {{ get_setting('contact_email') }}</td>
|
||||
<td class="text-right small"><span class="gry-color small">{{ translate('Order ID') }}:</span> <span class="strong">{{ $order->code }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gry-color small">{{ translate('Phone') }}: {{ get_setting('contact_phone') }}</td>
|
||||
<td class="text-right small"><span class="gry-color small">{{ translate('Order Date') }}:</span> <span class=" strong">{{ date('d-m-Y', $order->date) }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gry-color small"></td>
|
||||
<td class="text-right small">
|
||||
<span class="gry-color small">
|
||||
{{ translate('Payment method') }}:
|
||||
</span>
|
||||
<span class="strong">
|
||||
{{ translate(ucfirst(str_replace('_', ' ', $order->payment_type))) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="padding: 1rem;padding-bottom: 0">
|
||||
<table>
|
||||
@php
|
||||
$shipping_address = json_decode($order->shipping_address);
|
||||
@endphp
|
||||
<tr><td class="strong small gry-color">{{ translate('Bill to') }}:</td></tr>
|
||||
<tr><td class="strong">{{ $shipping_address->name }}</td></tr>
|
||||
<tr><td class="gry-color small">{{ $shipping_address->address }}, {{ $shipping_address->city }}, @if(isset(json_decode($order->shipping_address)->state)) {{ json_decode($order->shipping_address)->state }} - @endif {{ $shipping_address->postal_code }}, {{ $shipping_address->country }}</td></tr>
|
||||
<tr><td class="gry-color small">{{ translate('Email') }}: {{ $shipping_address->email }}</td></tr>
|
||||
<tr><td class="gry-color small">{{ translate('Phone') }}: {{ $shipping_address->phone }}</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="padding: 1rem;">
|
||||
<table class="padding text-left small border-bottom">
|
||||
<thead>
|
||||
<tr class="gry-color" style="background: #eceff4;">
|
||||
<th width="35%" class="text-left">{{ translate('Product Name') }}</th>
|
||||
<th width="15%" class="text-left">{{ translate('Delivery Type') }}</th>
|
||||
<th width="10%" class="text-left">{{ translate('Qty') }}</th>
|
||||
<th width="15%" class="text-left">{{ translate('Unit Price') }}</th>
|
||||
<th width="10%" class="text-left">{{ translate('Tax') }}</th>
|
||||
<th width="15%" class="text-right">{{ translate('Total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="strong">
|
||||
@foreach ($order->orderDetails as $key => $orderDetail)
|
||||
@if ($orderDetail->product != null)
|
||||
<tr class="">
|
||||
<td>
|
||||
{{ $orderDetail->product->name }}
|
||||
@if($orderDetail->variation != null) ({{ $orderDetail->variation }}) @endif
|
||||
<br>
|
||||
<small>
|
||||
@php
|
||||
$product_stock = json_decode($orderDetail->product->stocks->first(), true);
|
||||
@endphp
|
||||
{{translate('SKU')}}: {{ $product_stock['sku'] }}
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
@if ($order->shipping_type != null && $order->shipping_type == 'home_delivery')
|
||||
{{ translate('Home Delivery') }}
|
||||
@elseif ($order->shipping_type == 'pickup_point')
|
||||
@if ($order->pickup_point != null)
|
||||
{{ $order->pickup_point->getTranslation('name') }} ({{ translate('Pickip Point') }})
|
||||
@else
|
||||
{{ translate('Pickup Point') }}
|
||||
@endif
|
||||
@elseif ($order->shipping_type == 'carrier')
|
||||
@if ($order->carrier != null)
|
||||
{{ $order->carrier->name }} ({{ translate('Carrier') }})
|
||||
<br>
|
||||
{{ translate('Transit Time').' - '.$order->carrier->transit_time }}
|
||||
@else
|
||||
{{ translate('Carrier') }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="">{{ $orderDetail->quantity }}</td>
|
||||
<td class="currency">{{ single_price($orderDetail->price/$orderDetail->quantity) }}</td>
|
||||
<td class="currency">{{ single_price($orderDetail->tax/$orderDetail->quantity) }}</td>
|
||||
<td class="text-right currency">{{ single_price($orderDetail->price+$orderDetail->tax) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="padding:0 1.5rem;">
|
||||
<table class="text-right sm-padding small strong">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60%"></th>
|
||||
<th width="40%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
@php
|
||||
$removedXML = '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
@endphp
|
||||
{!! str_replace($removedXML,"", QrCode::size(100)->generate($order->code)) !!}
|
||||
</td>
|
||||
<td>
|
||||
<table class="text-right sm-padding small strong">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="gry-color text-left">{{ translate('Sub Total') }}</th>
|
||||
<td class="currency">{{ single_price($order->orderDetails->sum('price')) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="gry-color text-left">{{ translate('Shipping Cost') }}</th>
|
||||
<td class="currency">{{ single_price($order->orderDetails->sum('shipping_cost')) }}</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<th class="gry-color text-left">{{ translate('Total Tax') }}</th>
|
||||
<td class="currency">{{ single_price($order->orderDetails->sum('tax')) }}</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<th class="gry-color text-left">{{ translate('Coupon Discount') }}</th>
|
||||
<td class="currency">{{ single_price($order->coupon_discount) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left strong">{{ translate('Grand Total') }}</th>
|
||||
<td class="currency">{{ single_price($order->grand_total) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
136
resources/views/backend/layouts/app.blade.php
Normal file
136
resources/views/backend/layouts/app.blade.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<!doctype html>
|
||||
@if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1)
|
||||
<html dir="rtl" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@else
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@endif
|
||||
<head>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="app-url" content="{{ getBaseURL() }}">
|
||||
<meta name="file-base-url" content="{{ getFileBaseURL() }}">
|
||||
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="{{ uploaded_asset(get_setting('site_icon')) }}">
|
||||
<title>{{ get_setting('website_name').' | '.get_setting('site_motto') }}</title>
|
||||
|
||||
<!-- google font -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700">
|
||||
|
||||
<!-- aiz core css -->
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/vendors.css') }}">
|
||||
@if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1)
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/bootstrap-rtl.min.css') }}">
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/aiz-core.css') }}">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var AIZ = AIZ || {};
|
||||
AIZ.local = {
|
||||
nothing_selected: '{!! translate('Nothing selected', null, true) !!}',
|
||||
nothing_found: '{!! translate('Nothing found', null, true) !!}',
|
||||
choose_file: '{{ translate('Choose file') }}',
|
||||
file_selected: '{{ translate('File selected') }}',
|
||||
files_selected: '{{ translate('Files selected') }}',
|
||||
add_more_files: '{{ translate('Add more files') }}',
|
||||
adding_more_files: '{{ translate('Adding more files') }}',
|
||||
drop_files_here_paste_or: '{{ translate('Drop files here, paste or') }}',
|
||||
browse: '{{ translate('Browse') }}',
|
||||
upload_complete: '{{ translate('Upload complete') }}',
|
||||
upload_paused: '{{ translate('Upload paused') }}',
|
||||
resume_upload: '{{ translate('Resume upload') }}',
|
||||
pause_upload: '{{ translate('Pause upload') }}',
|
||||
retry_upload: '{{ translate('Retry upload') }}',
|
||||
cancel_upload: '{{ translate('Cancel upload') }}',
|
||||
uploading: '{{ translate('Uploading') }}',
|
||||
processing: '{{ translate('Processing') }}',
|
||||
complete: '{{ translate('Complete') }}',
|
||||
file: '{{ translate('File') }}',
|
||||
files: '{{ translate('Files') }}',
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="aiz-main-wrapper">
|
||||
@include('backend.inc.admin_sidenav')
|
||||
<div class="aiz-content-wrapper">
|
||||
@include('backend.inc.admin_nav')
|
||||
<div class="aiz-main-content">
|
||||
<div class="px-15px px-lg-25px">
|
||||
@yield('content')
|
||||
</div>
|
||||
<div class="bg-white text-center py-3 px-15px px-lg-25px mt-auto">
|
||||
<p class="mb-0">© {{ get_setting('site_name') }} v{{ get_setting('current_version') }}</p>
|
||||
</div>
|
||||
</div><!-- .aiz-main-content -->
|
||||
</div><!-- .aiz-content-wrapper -->
|
||||
</div><!-- .aiz-main-wrapper -->
|
||||
|
||||
@yield('modal')
|
||||
|
||||
|
||||
<script src="{{ static_asset('assets/js/vendors.js') }}" ></script>
|
||||
<script src="{{ static_asset('assets/js/aiz-core.js') }}" ></script>
|
||||
|
||||
@yield('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
@foreach (session('flash_notification', collect())->toArray() as $message)
|
||||
AIZ.plugins.notify('{{ $message['level'] }}', '{{ $message['message'] }}');
|
||||
@endforeach
|
||||
|
||||
|
||||
if ($('#lang-change').length > 0) {
|
||||
$('#lang-change .dropdown-menu a').each(function() {
|
||||
$(this).on('click', function(e){
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
var locale = $this.data('flag');
|
||||
$.post('{{ route('language.change') }}',{_token:'{{ csrf_token() }}', locale:locale}, function(data){
|
||||
location.reload();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
function menuSearch(){
|
||||
var filter, item;
|
||||
filter = $("#menu-search").val().toUpperCase();
|
||||
items = $("#main-menu").find("a");
|
||||
items = items.filter(function(i,item){
|
||||
if($(item).find(".aiz-side-nav-text")[0].innerText.toUpperCase().indexOf(filter) > -1 && $(item).attr('href') !== '#'){
|
||||
return item;
|
||||
}
|
||||
});
|
||||
|
||||
if(filter !== ''){
|
||||
$("#main-menu").addClass('d-none');
|
||||
$("#search-menu").html('')
|
||||
if(items.length > 0){
|
||||
for (i = 0; i < items.length; i++) {
|
||||
const text = $(items[i]).find(".aiz-side-nav-text")[0].innerText;
|
||||
const link = $(items[i]).attr('href');
|
||||
$("#search-menu").append(`<li class="aiz-side-nav-item"><a href="${link}" class="aiz-side-nav-link"><i class="las la-ellipsis-h aiz-side-nav-icon"></i><span>${text}</span></a></li`);
|
||||
}
|
||||
}else{
|
||||
$("#search-menu").html(`<li class="aiz-side-nav-item"><span class="text-center text-muted d-block">{{ translate('Nothing Found') }}</span></li>`);
|
||||
}
|
||||
}else{
|
||||
$("#main-menu").removeClass('d-none');
|
||||
$("#search-menu").html('')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
156
resources/views/backend/layouts/blank.blade.php
Normal file
156
resources/views/backend/layouts/blank.blade.php
Normal file
@@ -0,0 +1,156 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="app-url" content="{{ env('APP_URL')}}">
|
||||
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- Favicon -->
|
||||
<title>{{ config('app.name', 'eCommerce') }}</title>
|
||||
|
||||
<!-- google font -->
|
||||
{{-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700"> --}}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- aiz core css -->
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/vendors.css') }}">
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/aiz-core.css?v=') }}{{ rand(1000,9999) }}">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
.install-card{
|
||||
width: 640px;
|
||||
height: 640px;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
box-shadow: 0px 16px 45px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.install-card .install-card-body{
|
||||
padding: 3rem 4rem !important;
|
||||
}
|
||||
.btn-install{
|
||||
width: 280px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 0;
|
||||
border-radius: 20px;
|
||||
background: linear-gradient(to right, #e90608 0%, #f59e39 100%);
|
||||
box-shadow: 0px 8px 16px rgba(255, 88, 0, 0.16);
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
color: #fff !important;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
.btn-install:hover{
|
||||
box-shadow: 0px 8px 40px rgb(255 88 0 / 30%);
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.back-btn-svg svg * {
|
||||
transition: fill .4s ease;
|
||||
}
|
||||
.back-btn-svg:hover svg .inner{
|
||||
fill: #cccccc !important;
|
||||
}
|
||||
.back-btn-svg:hover svg .arrow{
|
||||
fill: #fff !important;
|
||||
}
|
||||
.right-links{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
background: transparent;
|
||||
font-size: inherit;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
width: 11rem;
|
||||
height: auto;
|
||||
}
|
||||
.right-links .circle {
|
||||
transition: all 0.8s cubic-bezier(0.65,0,.076,1);
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
border-radius: 1.625rem;
|
||||
padding-left: 12px;
|
||||
}
|
||||
.right-links.site .circle {
|
||||
background: #007cff;
|
||||
}
|
||||
.right-links.video .circle {
|
||||
background: #ea4335;
|
||||
}
|
||||
.right-links.document .circle {
|
||||
background: #34a853;
|
||||
}
|
||||
.right-links.site:hover .circle {
|
||||
width: 100%;
|
||||
}
|
||||
.right-links.video:hover .circle {
|
||||
width: 8.5rem;
|
||||
}
|
||||
.right-links.document:hover .circle {
|
||||
width: 10.5rem;
|
||||
}
|
||||
.right-links .button-text {
|
||||
transition: all 0.5s cubic-bezier(0.65,0,.076,1);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 0.65rem 0;
|
||||
margin: 0 0 0 2.75rem;
|
||||
color: #f2f3f8;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
opacity: 0;
|
||||
}
|
||||
.right-links:hover .button-text {
|
||||
color: var(--white);
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var AIZ = AIZ || {};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="aiz-main-wrapper d-flex">
|
||||
|
||||
<div class="flex-grow-1">
|
||||
@yield('content')
|
||||
</div>
|
||||
|
||||
</div><!-- .aiz-main-wrapper -->
|
||||
<script src="{{ static_asset('assets/js/vendors.js') }}" ></script>
|
||||
<script src="{{ static_asset('assets/js/aiz-core.js?v=') }}{{ rand(1000,9999) }}" ></script>
|
||||
|
||||
@yield('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
@foreach (session('flash_notification', collect())->toArray() as $message)
|
||||
AIZ.plugins.notify('{{ $message['level'] }}', '{{ $message['message'] }}');
|
||||
@endforeach
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
85
resources/views/backend/layouts/layout.blade.php
Normal file
85
resources/views/backend/layouts/layout.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<!doctype html>
|
||||
@if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1)
|
||||
<html dir="rtl" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@else
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@endif
|
||||
<head>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="app-url" content="{{ getBaseURL() }}">
|
||||
<meta name="file-base-url" content="{{ getFileBaseURL() }}">
|
||||
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="{{ uploaded_asset(get_setting('site_icon')) }}">
|
||||
<title>{{ get_setting('website_name').' | '.get_setting('site_motto') }}</title>
|
||||
|
||||
<!-- google font -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700">
|
||||
|
||||
<!-- aiz core css -->
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/vendors.css') }}">
|
||||
@if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1)
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/bootstrap-rtl.min.css') }}">
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ static_asset('assets/css/aiz-core.css') }}">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var AIZ = AIZ || {};
|
||||
AIZ.local = {
|
||||
nothing_selected: '{{ translate('Nothing selected') }}',
|
||||
nothing_found: '{{ translate('Nothing found') }}',
|
||||
choose_file: '{{ translate('Choose file') }}',
|
||||
file_selected: '{{ translate('File selected') }}',
|
||||
files_selected: '{{ translate('Files selected') }}',
|
||||
add_more_files: '{{ translate('Add more files') }}',
|
||||
adding_more_files: '{{ translate('Adding more files') }}',
|
||||
drop_files_here_paste_or: '{{ translate('Drop files here, paste or') }}',
|
||||
browse: '{{ translate('Browse') }}',
|
||||
upload_complete: '{{ translate('Upload complete') }}',
|
||||
upload_paused: '{{ translate('Upload paused') }}',
|
||||
resume_upload: '{{ translate('Resume upload') }}',
|
||||
pause_upload: '{{ translate('Pause upload') }}',
|
||||
retry_upload: '{{ translate('Retry upload') }}',
|
||||
cancel_upload: '{{ translate('Cancel upload') }}',
|
||||
uploading: '{{ translate('Uploading') }}',
|
||||
processing: '{{ translate('Processing') }}',
|
||||
complete: '{{ translate('Complete') }}',
|
||||
file: '{{ translate('File') }}',
|
||||
files: '{{ translate('Files') }}',
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="aiz-main-wrapper d-flex">
|
||||
<div class="flex-grow-1">
|
||||
@yield('content')
|
||||
</div>
|
||||
</div><!-- .aiz-main-wrapper -->
|
||||
|
||||
@yield('modal')
|
||||
|
||||
|
||||
<script src="{{ static_asset('assets/js/vendors.js') }}" ></script>
|
||||
<script src="{{ static_asset('assets/js/aiz-core.js') }}" ></script>
|
||||
|
||||
@yield('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
@foreach (session('flash_notification', collect())->toArray() as $message)
|
||||
AIZ.plugins.notify('{{ $message['level'] }}', '{{ $message['message'] }}');
|
||||
@endforeach
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
62
resources/views/backend/marketing/coupons/create.blade.php
Normal file
62
resources/views/backend/marketing/coupons/create.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Coupon Information Adding')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('coupon.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mt-3">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label" for="name">{{translate('Coupon Type')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="type" id="coupon_type" class="form-control aiz-selectpicker" onchange="coupon_form()" required>
|
||||
<option value="">{{translate('Select One') }}</option>
|
||||
<option value="product_base" @if (old('type') == 'product_base') selected @endif>{{translate('For Products')}}</option>
|
||||
<option value="cart_base" @if (old('type') == 'cart_base') selected @endif>{{translate('For Total Orders')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="coupon_form">
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function coupon_form(){
|
||||
var coupon_type = $('#coupon_type').val();
|
||||
$.post('{{ route('coupon.get_coupon_form') }}',{_token:'{{ csrf_token() }}', coupon_type:coupon_type}, function(data){
|
||||
$('#coupon_form').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
@if($errors->any())
|
||||
coupon_form();
|
||||
@endif
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
69
resources/views/backend/marketing/coupons/edit.blade.php
Normal file
69
resources/views/backend/marketing/coupons/edit.blade.php
Normal file
@@ -0,0 +1,69 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">{{translate('Coupon Information Update')}}</h3>
|
||||
</div>
|
||||
<form action="{{ route('coupon.update', $coupon->id) }}" method="POST">
|
||||
<input name="_method" type="hidden" value="PATCH">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="{{ $coupon->id }}" id="id">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mt-3">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label" for="name">{{translate('Coupon Type')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="type" id="coupon_type" class="form-control aiz-selectpicker" onchange="coupon_form()" required>
|
||||
@if ($coupon->type == "product_base"))
|
||||
<option value="product_base" selected>{{translate('For Products')}}</option>
|
||||
@elseif ($coupon->type == "cart_base")
|
||||
<option value="cart_base">{{translate('For Total Orders')}}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="coupon_form">
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function coupon_form(){
|
||||
var coupon_type = $('#coupon_type').val();
|
||||
var id = $('#id').val();
|
||||
$.post('{{ route('coupon.get_coupon_form_edit') }}',{_token:'{{ csrf_token() }}', coupon_type:coupon_type, id:id}, function(data){
|
||||
$('#coupon_form').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
coupon_form();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
68
resources/views/backend/marketing/coupons/index.blade.php
Normal file
68
resources/views/backend/marketing/coupons/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{translate('All Coupons')}}</h1>
|
||||
</div>
|
||||
@can('add_coupon')
|
||||
<div class="col-md-6 text-md-right">
|
||||
<a href="{{ route('coupon.create') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Add New Coupon')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Coupon Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table p-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Code')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Type')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Start Date')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('End Date')}}</th>
|
||||
<th width="10%">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($coupons as $key => $coupon)
|
||||
<tr>
|
||||
<td>{{$key+1}}</td>
|
||||
<td>{{$coupon->code}}</td>
|
||||
<td>
|
||||
{{ translate(Str::headline($coupon->type)) }}
|
||||
</td>
|
||||
<td>{{ date('d-m-Y', $coupon->start_date) }}</td>
|
||||
<td>{{ date('d-m-Y', $coupon->end_date) }}</td>
|
||||
<td class="text-right">
|
||||
@can('edit_coupon')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('coupon.edit', encrypt($coupon->id) )}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_coupon')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('coupon.destroy', $coupon->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
106
resources/views/backend/marketing/flash_deals/create.blade.php
Normal file
106
resources/views/backend/marketing/flash_deals/create.blade.php
Normal file
@@ -0,0 +1,106 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Flash Deal Information')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('flash_deals.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label" for="name">{{translate('Title')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('Title')}}" id="name" name="title" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label" for="background_color">{{translate('Background Color')}} <small>({{ translate('Hexa-code') }})</small></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('#FFFFFF')}}" id="background_color" name="background_color" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 control-label" for="name">{{translate('Text Color')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="text_color" id="text_color" class="form-control aiz-selectpicker" required>
|
||||
<option value="">{{translate('Select One')}}</option>
|
||||
<option value="white">{{translate('White')}}</option>
|
||||
<option value="dark">{{translate('Dark')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Banner')}}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="banner" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
<span class="small text-muted">{{ translate('This image is shown as cover banner in flash deal details page.') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label" for="start_date">{{translate('Date')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" name="date_range" placeholder="{{ translate('Select Date') }}" data-time-picker="true" data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row mb-3">
|
||||
<label class="col-sm-3 control-label" for="products">{{translate('Products')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="products[]" id="products" class="form-control aiz-selectpicker" multiple required data-placeholder="{{ translate('Choose Products') }}" data-live-search="true" data-selected-text-format="count">
|
||||
@foreach(\App\Models\Product::where('published', 1)->where('approved', 1)->orderBy('created_at', 'desc')->get() as $product)
|
||||
<option value="{{$product->id}}">{{ $product->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
{{ translate('If any product has discount or exists in another flash deal, the discount will be replaced by this discount & time limit.') }}
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="form-group" id="discount_table">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#products').on('change', function(){
|
||||
var product_ids = $('#products').val();
|
||||
if(product_ids.length > 0){
|
||||
$.post('{{ route('flash_deals.product_discount') }}', {_token:'{{ csrf_token() }}', product_ids:product_ids}, function(data){
|
||||
$('#discount_table').html(data);
|
||||
AIZ.plugins.fooTable();
|
||||
});
|
||||
}
|
||||
else{
|
||||
$('#discount_table').html(null);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
135
resources/views/backend/marketing/flash_deals/edit.blade.php
Normal file
135
resources/views/backend/marketing/flash_deals/edit.blade.php
Normal file
@@ -0,0 +1,135 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h5 class="mb-0 h6">{{translate('Flash Deal Information')}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-body p-0">
|
||||
<ul class="nav nav-tabs nav-fill border-light">
|
||||
@foreach (\App\Models\Language::all() as $key => $language)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-reset @if ($language->code == $lang) active @else bg-soft-dark border-light border-left-0 @endif py-3" href="{{ route('flash_deals.edit', ['id'=>$flash_deal->id, 'lang'=> $language->code] ) }}">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" height="11" class="mr-1">
|
||||
<span>{{$language->name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<form class="p-4" action="{{ route('flash_deals.update', $flash_deal->id) }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="_method" value="PATCH">
|
||||
<input type="hidden" name="lang" value="{{ $lang }}">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="name">{{translate('Title')}} <i class="las la-language text-danger" title="{{translate('Translatable')}}"></i></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('Title')}}" id="name" name="title" value="{{ $flash_deal->getTranslation('title', $lang) }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="background_color">{{translate('Background Color')}}<small>({{ translate('Hexa-code') }})</small></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{translate('#0000ff')}}" id="background_color" name="background_color" value="{{ $flash_deal->background_color }}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label" for="text_color">{{translate('Text Color')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="text_color" id="text_color" class="form-control demo-select2" required>
|
||||
<option value="">Select One</option>
|
||||
<option value="white" @if ($flash_deal->text_color == 'white') selected @endif>{{translate('White')}}</option>
|
||||
<option value="dark" @if ($flash_deal->text_color == 'dark') selected @endif>{{translate('Dark')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label" for="signinSrEmail">{{translate('Banner')}}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="banner" value="{{ $flash_deal->banner }}" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$start_date = date('d-m-Y H:i:s', $flash_deal->start_date);
|
||||
$end_date = date('d-m-Y H:i:s', $flash_deal->end_date);
|
||||
@endphp
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="start_date">{{translate('Date')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control aiz-date-range" value="{{ $start_date.' to '.$end_date }}" name="date_range" placeholder="{{ translate('Select Date') }}" data-time-picker="true" data-format="DD-MM-Y HH:mm:ss" data-separator=" to " autocomplete="off" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="products">{{translate('Products')}}</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="products[]" id="products" class="form-control aiz-selectpicker" multiple required data-placeholder="{{ translate('Choose Products') }}" data-live-search="true" data-selected-text-format="count">
|
||||
@foreach(\App\Models\Product::where('published', 1)->where('approved', 1)->get() as $product)
|
||||
@php
|
||||
$flash_deal_product = \App\Models\FlashDealProduct::where('flash_deal_id', $flash_deal->id)->where('product_id', $product->id)->first();
|
||||
@endphp
|
||||
<option value="{{$product->id}}" <?php if($flash_deal_product != null) echo "selected";?> >{{ $product->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
{{ translate('If any product has discount or exists in another flash deal, the discount will be replaced by this discount & time limit.') }}
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-group" id="discount_table">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
get_flash_deal_discount();
|
||||
|
||||
$('#products').on('change', function(){
|
||||
get_flash_deal_discount();
|
||||
});
|
||||
|
||||
function get_flash_deal_discount(){
|
||||
var product_ids = $('#products').val();
|
||||
if(product_ids.length > 0){
|
||||
$.post('{{ route('flash_deals.product_discount_edit') }}', {_token:'{{ csrf_token() }}', product_ids:product_ids, flash_deal_id:{{ $flash_deal->id }}}, function(data){
|
||||
$('#discount_table').html(data);
|
||||
AIZ.plugins.fooTable();
|
||||
});
|
||||
}
|
||||
else{
|
||||
$('#discount_table').html(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,51 @@
|
||||
@if(count($product_ids) > 0)
|
||||
<table class="table table-bordered aiz-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<span>{{translate('Product')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="20%">
|
||||
<span>{{translate('Base Price')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="20%">
|
||||
<span>{{translate('Discount')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="10%">
|
||||
<span>{{translate('Discount Type')}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($product_ids as $key => $id)
|
||||
@php
|
||||
$product = \App\Models\Product::findOrFail($id);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<div class="from-group row">
|
||||
<div class="col-auto">
|
||||
<img class="size-60px img-fit" src="{{ uploaded_asset($product->thumbnail_img)}}">
|
||||
</div>
|
||||
<div class="col">
|
||||
<span>{{ $product->getTranslation('name') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ $product->unit_price }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" lang="en" name="discount_{{ $id }}" value="{{ $product->discount }}" min="0" step="1" class="form-control" required>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control aiz-selectpicker" name="discount_type_{{ $id }}">
|
||||
<option value="amount">{{ translate('Flat') }}</option>
|
||||
<option value="percent">{{ translate('Percent') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@@ -0,0 +1,52 @@
|
||||
@if(count($product_ids) > 0)
|
||||
<table class="table table-bordered aiz-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<span>{{translate('Product')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="20%">
|
||||
<span>{{translate('Base Price')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="20%">
|
||||
<span>{{translate('Discount')}}</span>
|
||||
</td>
|
||||
<td data-breakpoints="lg" width="10%">
|
||||
<span>{{translate('Discount Type')}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($product_ids as $key => $id)
|
||||
@php
|
||||
$product = \App\Models\Product::findOrFail($id);
|
||||
$flash_deal_product = \App\Models\FlashDealProduct::where('flash_deal_id', $flash_deal_id)->where('product_id', $product->id)->first();
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<div class="form-group row">
|
||||
<div class="col-auto">
|
||||
<img src="{{ uploaded_asset($product->thumbnail_img)}}" class="size-60px img-fit" >
|
||||
</div>
|
||||
<div class="col">
|
||||
<span>{{ $product->getTranslation('name') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ $product->unit_price }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" lang="en" name="discount_{{ $id }}" value="{{ $product->discount }}" min="0" step="1" class="form-control" required>
|
||||
</td>
|
||||
<td>
|
||||
<select class="aiz-selectpicker" name="discount_type_{{ $id }}">
|
||||
<option value="amount" <?php if($product->discount_type == 'amount') echo "selected";?> >{{ translate('Flat') }}</option>
|
||||
<option value="percent" <?php if($product->discount_type == 'percent') echo "selected";?> >{{ translate('Percent') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
139
resources/views/backend/marketing/flash_deals/index.blade.php
Normal file
139
resources/views/backend/marketing/flash_deals/index.blade.php
Normal file
@@ -0,0 +1,139 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{translate('All Flash Deals')}}</h1>
|
||||
</div>
|
||||
@can('add_flash_deal')
|
||||
<div class="col-md-6 text-md-right">
|
||||
<a href="{{ route('flash_deals.create') }}" class="btn btn-circle btn-info">
|
||||
<span>{{translate('Create New Flash Deal')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Flash Deals')}}</h5>
|
||||
<div class="pull-right clearfix">
|
||||
<form class="" id="sort_flash_deals" action="" method="GET">
|
||||
<div class="box-inline pad-rgt pull-left">
|
||||
<div class="" style="min-width: 200px;">
|
||||
<input type="text" class="form-control" id="search" name="search"@isset($sort_search) value="{{ $sort_search }}" @endisset placeholder="{{ translate('Type name & Enter') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Title')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Banner') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Start Date') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('End Date') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Status') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Featured') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Page Link') }}</th>
|
||||
<th class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($flash_deals as $key => $flash_deal)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($flash_deals->currentPage() - 1)*$flash_deals->perPage() }}</td>
|
||||
<td>{{ $flash_deal->getTranslation('title') }}</td>
|
||||
<td><img src="{{ uploaded_asset($flash_deal->banner) }}" alt="banner" class="h-50px"></td>
|
||||
<td>{{ date('d-m-Y H:i:s', $flash_deal->start_date) }}</td>
|
||||
<td>{{ date('d-m-Y H:i:s', $flash_deal->end_date) }}</td>
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input onchange="update_flash_deal_status(this)" value="{{ $flash_deal->id }}" type="checkbox" <?php if($flash_deal->status == 1) echo "checked";?> >
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input
|
||||
@can('publish_flash_deal') onchange="update_flash_deal_feature(this)" @endcan
|
||||
value="{{ $flash_deal->id }}" type="checkbox"
|
||||
<?php if($flash_deal->featured == 1) echo "checked";?>
|
||||
@cannot('publish_flash_deal') disabled @endcan
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>{{ url('flash-deal/'.$flash_deal->slug) }}</td>
|
||||
<td class="text-right">
|
||||
@can('edit_flash_deal')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('flash_deals.edit', ['id'=>$flash_deal->id, 'lang'=>env('DEFAULT_LANGUAGE')] )}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_flash_deal')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('flash_deals.destroy', $flash_deal->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clearfix">
|
||||
<div class="pull-right">
|
||||
{{ $flash_deals->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function update_flash_deal_status(el){
|
||||
if(el.checked){
|
||||
var status = 1;
|
||||
}
|
||||
else{
|
||||
var status = 0;
|
||||
}
|
||||
$.post('{{ route('flash_deals.update_status') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
|
||||
if(data == 1){
|
||||
location.reload();
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
function update_flash_deal_feature(el){
|
||||
if(el.checked){
|
||||
var featured = 1;
|
||||
}
|
||||
else{
|
||||
var featured = 0;
|
||||
}
|
||||
$.post('{{ route('flash_deals.update_featured') }}', {_token:'{{ csrf_token() }}', id:el.value, featured:featured}, function(data){
|
||||
if(data == 1){
|
||||
location.reload();
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,56 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Send Newsletter')}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('newsletters.send') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="name">{{translate('Emails')}} ({{translate('Users')}})</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control aiz-selectpicker" name="user_emails[]" multiple data-selected-text-format="count" data-actions-box="true">
|
||||
@foreach($users as $user)
|
||||
<option value="{{$user->email}}">{{$user->email}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="name">{{translate('Emails')}} ({{translate('Subscribers')}})</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control aiz-selectpicker" name="subscriber_emails[]" multiple data-selected-text-format="count" data-actions-box="true">
|
||||
@foreach($subscribers as $subscriber)
|
||||
<option value="{{$subscriber->email}}">{{$subscriber->email}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="subject">{{translate('Newsletter subject')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="subject" id="subject" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-from-label" for="name">{{translate('Newsletter content')}}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="8" class="form-control aiz-text-editor" data-buttons='[["font", ["bold", "underline", "italic"]],["para", ["ul", "ol"]], ["insert", ["link", "picture"]],["view", ["undo","redo"]]]' name="content" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Send')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,47 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('All Subscribers')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Email')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Date')}}</th>
|
||||
<th data-breakpoints="lg" class="text-right">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($subscribers as $key => $subscriber)
|
||||
<tr>
|
||||
<td>{{ ($key+1) + ($subscribers->currentPage() - 1)*$subscribers->perPage() }}</td>
|
||||
<td><div class="text-truncate">{{ $subscriber->email }}</div></td>
|
||||
<td>{{ date('d-m-Y', strtotime($subscriber->created_at)) }}</td>
|
||||
<td class="text-right">
|
||||
@can('delete_subscriber')
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('subscriber.destroy', $subscriber->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clearfix">
|
||||
<div class="pull-right">
|
||||
{{ $subscribers->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
58
resources/views/backend/notification/index.blade.php
Normal file
58
resources/views/backend/notification/index.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="align-items-center">
|
||||
<h1 class="h3">{{translate('All Notifications')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="card">
|
||||
<form class="" id="sort_customers" action="" method="GET">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-0 h6">{{translate('Notifications')}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group list-group-flush">
|
||||
@forelse($notifications as $notification)
|
||||
@if($notification->type == 'App\Notifications\OrderNotification')
|
||||
<li class="list-group-item d-flex justify-content-between align-items- py-3">
|
||||
<div class="media text-inherit">
|
||||
<div class="media-body">
|
||||
<p class="mb-1 text-truncate-2">
|
||||
{{ translate('Order code: ') }}
|
||||
<a href="{{route('all_orders.show', encrypt($notification->data['order_id']))}}">
|
||||
{{$notification->data['order_code']}}
|
||||
</a>
|
||||
{{translate(' has been '. ucfirst(str_replace('_', ' ', $notification->data['status'])))}}
|
||||
</p>
|
||||
<small class="text-muted">
|
||||
{{ date("F j Y, g:i a", strtotime($notification->created_at)) }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@empty
|
||||
<li class="list-group-item">
|
||||
<div class="py-4 text-center fs-16">{{ translate('No notification found') }}</div>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
|
||||
{{ $notifications->links() }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<h4 class="text-center text-muted">{{translate('Activate OTP')}}</h4>
|
||||
<div class="row">
|
||||
@foreach ($otp_configurations as $otp_configuration)
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">
|
||||
{{translate(Str::replace('_', ' ',Str::title($otp_configuration->type)).' OTP')}}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input type="checkbox" onchange='updateSettings(this, "{{ $otp_configuration->type }}")' @if($otp_configuration->value == 1) checked @endif>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function updateSettings(el, type){
|
||||
if($(el).is(':checked')){
|
||||
var value = 1;
|
||||
}
|
||||
else{
|
||||
var value = 0;
|
||||
}
|
||||
$.post('{{ route('otp_configurations.update.activation') }}', {_token:'{{ csrf_token() }}', type:type, value:value}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Settings updated successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,28 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
|
||||
@foreach ($otp_configurations as $otp_configuration)
|
||||
@include('backend.otp_systems.configurations.partials.'.$otp_configuration->type)
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$("#ZENDER_MODE").change(function() {
|
||||
var value = $(this).val();
|
||||
let changeVal = '';
|
||||
if (value == "devices") {
|
||||
changeVal = 'device';
|
||||
} else {
|
||||
changeVal = 'gateway';
|
||||
}
|
||||
$("#ZENDER_MODE_TYPE").val(changeVal).change();
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,76 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Fast2SMS Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="fast2sms">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="AUTH_KEY">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('AUTH KEY') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="AUTH_KEY"
|
||||
value="{{ env('AUTH_KEY') }}" placeholder="AUTH KEY" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="ENTITY_ID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('ENTITY ID') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="ENTITY_ID"
|
||||
value="{{ env('ENTITY_ID') }}" placeholder="{{ translate('Entity ID') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="ROUTE">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('ROUTE') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<select class="form-control aiz-selectpicker" name="ROUTE" required>
|
||||
<option value="dlt_manual" @if (env('ROUTE') == 'dlt_manual') selected @endif>
|
||||
{{ translate('DLT Manual') }}</option>
|
||||
<option value="p" @if (env('ROUTE') == 'p') selected @endif>
|
||||
{{ translate('Promotional Use') }}</option>
|
||||
<option value="t" @if (env('ROUTE') == 't') selected @endif>
|
||||
{{ translate('Transactional Use') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="LANGUAGE">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('LANGUAGE') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<select class="form-control aiz-selectpicker" name="LANGUAGE" required>
|
||||
<option value="english" @if (env('LANGUAGE') == 'english') selected @endif>English
|
||||
</option>
|
||||
<option value="unicode" @if (env('LANGUAGE') == 'unicode') selected @endif>Unicode
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="SENDER_ID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('SENDER ID') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="SENDER_ID"
|
||||
value="{{ env('SENDER_ID') }}" placeholder="6 digit SENDER ID">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('MIMO Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="mimo">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIMO_USERNAME">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIMO_USERNAME') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIMO_USERNAME"
|
||||
value="{{ env('MIMO_USERNAME') }}" placeholder="MIMO_USERNAME" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIMO_PASSWORD">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIMO_PASSWORD') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIMO_PASSWORD"
|
||||
value="{{ env('MIMO_PASSWORD') }}" placeholder="MIMO_PASSWORD" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIMO_SENDER_ID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIMO_SENDER_ID') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIMO_SENDER_ID"
|
||||
value="{{ env('MIMO_SENDER_ID') }}" placeholder="MIMO_SENDER_ID" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('MIMSMS Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="mimsms">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIM_API_KEY">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIM_API_KEY') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIM_API_KEY"
|
||||
value="{{ env('MIM_API_KEY') }}" placeholder="MIM_API_KEY" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIM_SENDER_ID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIM_SENDER_ID') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIM_SENDER_ID"
|
||||
value="{{ env('MIM_SENDER_ID') }}" placeholder="MIM_SENDER_ID" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MIM_BASE_URL">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MIM_BASE_URL') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MIM_BASE_URL"
|
||||
value="{{ env('MIM_BASE_URL') }}" placeholder="MIM_BASE_URL" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('MSEGAT Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="msegat">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MSEGAT_API_KEY">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MSEGAT_API_KEY') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MSEGAT_API_KEY"
|
||||
value="{{ env('MSEGAT_API_KEY') }}" placeholder="MSEGAT_API_KEY" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MSEGAT_USERNAME">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MSEGAT_USERNAME') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MSEGAT_USERNAME"
|
||||
value="{{ env('MSEGAT_USERNAME') }}" placeholder="MSEGAT_USERNAME" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MSEGAT_USER_SENDER">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MSEGAT_USER_SENDER') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MSEGAT_USER_SENDER"
|
||||
value="{{ env('MSEGAT_USER_SENDER') }}" placeholder="MSEGAT_USER_SENDER" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Nexmo Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="nexmo">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="NEXMO_KEY">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('NEXMO KEY') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="NEXMO_KEY" value="{{ env('NEXMO_KEY') }}"
|
||||
placeholder="NEXMO KEY" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="NEXMO_SECRET">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('NEXMO SECRET') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="NEXMO_SECRET"
|
||||
value="{{ env('NEXMO_SECRET') }}" placeholder="NEXMO SECRET" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="NEXMO_SENDER_ID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{translate('NEXMO SENDER ID')}}</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="NEXMO_SENDER_ID" value="{{ env('NEXMO_SENDER_ID') }}" placeholder="NEXMO SENDER ID" required>
|
||||
<small>
|
||||
{{translate('Please check this URL for')}}
|
||||
<a href="https://developer.vonage.com/en/messaging/sms/guides/custom-sender-id?source=messaging">Sender Identity</a>
|
||||
{{translate('before setting the sender ID')}}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('SPARROW Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="sparrow">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="SPARROW_TOKEN">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('SPARROW_TOKEN') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="SPARROW_TOKEN"
|
||||
value="{{ env('SPARROW_TOKEN') }}" placeholder="SPARROW_TOKEN" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="MESSGAE_FROM">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('MESSGAE_FROM') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="MESSGAE_FROM"
|
||||
value="{{ env('MESSGAE_FROM') }}" placeholder="MESSGAE_FROM" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('SSL Wireless Credential') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||
<input type="hidden" name="otp_method" value="ssl_wireless">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="SSL_SMS_API_TOKEN">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('SSL SMS API TOKEN') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="SSL_SMS_API_TOKEN"
|
||||
value="{{ env('SSL_SMS_API_TOKEN') }}" placeholder="SSL SMS API TOKEN" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="SSL_SMS_SID">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('SSL SMS SID') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="SSL_SMS_SID"
|
||||
value="{{ env('SSL_SMS_SID') }}" placeholder="SSL SMS SID" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="hidden" name="types[]" value="SSL_SMS_URL">
|
||||
<div class="col-lg-3">
|
||||
<label class="col-from-label">{{ translate('SSL SMS URL') }}</label>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="SSL_SMS_URL"
|
||||
value="{{ env('SSL_SMS_URL') }}" placeholder="SSL SMS URL">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user