Skip to content

Commit

Permalink
Merge pull request #60 from avored/dev
Browse files Browse the repository at this point in the history
merging dev to master
  • Loading branch information
indpurvesh authored Jan 4, 2019
2 parents 50567dc + d188b2a commit 0273fe3
Show file tree
Hide file tree
Showing 61 changed files with 1,714 additions and 196 deletions.
3 changes: 1 addition & 2 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'email' => $faker->email,
'password' => bcrypt($faker->phoneNumber),
'phone' => $faker->phoneNumber,
'status' => 'LIVE'

'status' => 'LIVE'
];
});
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,30 @@ public function up()
$table->string('params')->nullable()->default(null);
$table->timestamps();

$table->foreign('menu_group_id')->references('id')->on('menu_groups')->onDelete('cascade');;
$table->foreign('menu_group_id')->references('id')->on('menu_groups')->onDelete('cascade');
});

Schema::create('tax_groups', function(Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable()->default(null);
$table->string('description')->nullable()->default(null);
$table->timestamps();
});

Schema::create('tax_rates', function(Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable()->default(null);
$table->string('description')->nullable()->default(null);
$table->float('rate', 10, 6);
$table->integer('country_id')->unsigned();
$table->integer('state_id')->unsigned()->nullable()->default(null);
$table->integer('postcode')->nullable()->default(null);
$table->enum('rate_type', ['PERCENTAGE', 'FIXED'])->default('PERCENTAGE');
$table->enum('applied_with', ['SHIPPING', 'BILLING', 'STORE'])->default('SHIPPING');
$table->timestamps();
});


$countryModel = Country::whereCode('nz')->first();
$countryModel->update(['is_active' => 1]);
$siteCurrency = SiteCurrency::create([
Expand Down
11 changes: 11 additions & 0 deletions resources/lang/en/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
'state-create' => 'Create State',
'state-update' => 'Update State',

'tax-group' => [
'title' => 'Tax Group',
'create' => 'Create Tax Group',
'update' => 'Update Tax Group',
],
'tax-rate' => [
'title' => 'Tax Rate',
'create' => 'Create Tax Rate',
'update' => 'Update Tax Rate',
],

'site-currency' => [
'title' => 'Currency',
'create' => 'Create Currency',
Expand Down
4 changes: 3 additions & 1 deletion resources/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ img {
border: none;
background: none;
}

.extra-product-link {
left: -120px !important;
}
#dataTable tr th:last-of-type {
min-width: 95px;
}
Expand Down
7 changes: 1 addition & 6 deletions resources/sass/spec/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
&.header {
background-color: $primary;
color: $white;

}

.avored-table-cell {
padding: 0.5em;

a, i {
color: $white;
}
Expand All @@ -39,17 +37,14 @@
.avored-table-row {
&:hover {
background-color: darken($light, 20%);

}

.avored-table-cell {
padding: 0.5em;

a {
color:inherit;
}
}
}

}
}
}
4 changes: 3 additions & 1 deletion resources/sass/spec/components/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
a {
.logo {
background-position: center center;
padding: 15px 10px;
width: $collapsed-size;
}
}
Expand Down Expand Up @@ -141,6 +142,7 @@
display: inline-block;
min-height: calc(#{$header-height} - 1px);
width: 100%;
padding: 15px 10px;
width: 70px;
}

Expand Down Expand Up @@ -445,4 +447,4 @@
left: 0;
}
}
}
}
5 changes: 4 additions & 1 deletion resources/views/datagrid/grid.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ class="form-control" />
</table>

<div class="row justify-content-end">
{!! $dataGrid->data->appends(Request::except($dataGrid->data->getPageName()))->links('pagination::bootstrap-4') !!}
<div class="col-12">
{!! $dataGrid->data->appends(Request::except($dataGrid->data->getPageName()))->links('pagination::bootstrap-4') !!}
</div>

</div>
2 changes: 1 addition & 1 deletion resources/views/forms/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
@endforeach
</select>

</div>
</div>
1 change: 1 addition & 0 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@include("avored-framework::layouts.nav")
<main class='main-content bgc-grey-100'>
<div id='mainContent'>
@include("avored-framework::layouts.notifications")
<div class="masonry-sizer col-md-6"></div>
<h4 class="c-grey-900 mT-10 mB-30">@yield('page-header')</h4>
@yield('content')
Expand Down
24 changes: 24 additions & 0 deletions resources/views/layouts/notifications.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="row">
<div class="col-12">
@if(session()->has('errorNotificationText'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

<strong>Error!</strong> {{ session()->get('errorNotificationText') }}
</div>
@endif


@if(session()->has('notificationText'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

<strong>Success!</strong> {{ session()->get('notificationText') }}
</div>
@endif
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<form action="{{ route('admin.order-status.store') }}" method="post">
@csrf

@include('avored-framework::product .order-status._fields')
@include('avored-framework::order.order-status._fields')

<div class="form-group">
<button class="btn btn-primary" type="submit">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@csrf()
@method('put')

@include('avored-framework::product.order-status._fields')
@include('avored-framework::order.order-status._fields')

<div class="form-group">
<button class="btn btn-primary" type="submit">
Expand Down
30 changes: 19 additions & 11 deletions resources/views/product/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

@section('content')
<h1>
<span class="main-title-wrap">{{ __('avored-framework::lang.product.index.title') }}</span>
<a style="" href="{{ route('admin.product.create') }}" class="btn btn-primary float-right">
{{ __('avored-framework::lang.product.create.text') }}
</a>
</h1>

<span class="main-title-wrap">{{ __('avored-framework::lang.product.index.title') }}</span>
<div class="btn-group float-right" role="group">
<a style="" href="{{ route('admin.product.create') }}" class="btn btn-primary">
{{ __('avored-framework::lang.product.create.text') }}
</a>

<div class="card">
<div class="card-body">
{!! DataGrid::render($dataGrid) !!}
</div>
</div>
<div class="btn-group" role="group">
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

</button>
<div class="dropdown-menu extra-product-link" aria-labelledby="btnGroupDrop1">
<a class="dropdown-item" href="#">Import Product</a>
<a class="dropdown-item" href="{{ route('admin.product.export') }}">Export Product</a>
</div>
</div>
</div>

</h1>
{!! DataGrid::render($dataGrid) !!}

@stop
2 changes: 1 addition & 1 deletion resources/views/system/site-currency/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<tr>
<td>Curreny Code</td>
<td>{{ $siteCurrency->curreny_code }}</td>
<td>{{ $siteCurrency->code }}</td>
</tr>

<tr>
Expand Down
2 changes: 2 additions & 0 deletions resources/views/system/tax-group/_fields.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@include('avored-framework::forms.text', ['name' => 'name', 'label' => 'Name'])
@include('avored-framework::forms.textarea', ['name' => 'description', 'label' => 'Description'])
33 changes: 33 additions & 0 deletions resources/views/system/tax-group/create.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@extends('avored-framework::layouts.app')

@section('content')

<div id="admin-tax-group-page" class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
{{ __('avored-framework::system.tax-group.create') }}
</div>
<div class="card-body">

<form action="{{ route('admin.tax-group.store') }}" method="post">
@csrf

@include('avored-framework::system.tax-group._fields')

<div class="form-group">
<button class="btn btn-primary" type="submit">
{{ __('avored-framework::system.tax-group.create') }}
</button>
<a href="{{ route('admin.tax-group.index') }}" class="btn">
{{ __('avored-framework::lang.cancel') }}
</a>
</div>

</form>
</div>
</div>

</div>
</div>
@endsection
57 changes: 57 additions & 0 deletions resources/views/system/tax-group/edit.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@extends('avored-framework::layouts.app')

@section('content')

<div id=admin-admin-state-page class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
{{ __('avored-framework::system.tax-group.update') }}
</div>
<div class="card-body">
<form action="{{ route('admin.tax-group.update', $model->id) }}"

method="post">
@csrf()
@method('put')

@include('avored-framework::system.tax-group._fields')

<div class="form-group">
<button class="btn btn-primary" type="submit">
{{ __('avored-framework::system.tax-group.update') }}
</button>
<a href="{{ route('admin.tax-group.index') }}" class="btn">
{{ __('avored-framework::lang.cancel') }}
</a>
</div>

</form>
</div>
</div>
</div>
</div>
@endsection

@push('scripts')

<script>
var app = new Vue({
el: '#admin-admin-state-page',
data : {
model: {},
autofocus:true,
disabled: true
},
methods: {
changeModelValue: function(val,fieldName) {
this.model[fieldName] = val;
}
}
});
</script>


@endpush
17 changes: 17 additions & 0 deletions resources/views/system/tax-group/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@extends('avored-framework::layouts.app')

@section('content')
<div class="container-fluid">
<div class="h1">
{{ __('avored-framework::system.tax-group.title') }}

<a href="{{ route('admin.tax-group.create') }}"
class="float-right btn btn-primary">
{{ __('avored-framework::system.tax-group.create') }}
</a>
</div>

{!! DataGrid::render($dataGrid) !!}

</div>
@stop
Loading

0 comments on commit 0273fe3

Please sign in to comment.