Skip to content

Commit 0273fe3

Browse files
authored
Merge pull request #60 from avored/dev
merging dev to master
2 parents 50567dc + d188b2a commit 0273fe3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1714
-196
lines changed

database/factories/UserFactory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'email' => $faker->email,
1010
'password' => bcrypt($faker->phoneNumber),
1111
'phone' => $faker->phoneNumber,
12-
'status' => 'LIVE'
13-
12+
'status' => 'LIVE'
1413
];
1514
});

database/migrations/2017_03_29_000000_avored_framework_schema.php

+22-1
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,30 @@ public function up()
607607
$table->string('params')->nullable()->default(null);
608608
$table->timestamps();
609609

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

613+
Schema::create('tax_groups', function(Blueprint $table) {
614+
$table->increments('id');
615+
$table->string('name')->nullable()->default(null);
616+
$table->string('description')->nullable()->default(null);
617+
$table->timestamps();
618+
});
619+
620+
Schema::create('tax_rates', function(Blueprint $table) {
621+
$table->increments('id');
622+
$table->string('name')->nullable()->default(null);
623+
$table->string('description')->nullable()->default(null);
624+
$table->float('rate', 10, 6);
625+
$table->integer('country_id')->unsigned();
626+
$table->integer('state_id')->unsigned()->nullable()->default(null);
627+
$table->integer('postcode')->nullable()->default(null);
628+
$table->enum('rate_type', ['PERCENTAGE', 'FIXED'])->default('PERCENTAGE');
629+
$table->enum('applied_with', ['SHIPPING', 'BILLING', 'STORE'])->default('SHIPPING');
630+
$table->timestamps();
631+
});
632+
633+
613634
$countryModel = Country::whereCode('nz')->first();
614635
$countryModel->update(['is_active' => 1]);
615636
$siteCurrency = SiteCurrency::create([

resources/lang/en/system.php

+11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
'state-create' => 'Create State',
1010
'state-update' => 'Update State',
1111

12+
'tax-group' => [
13+
'title' => 'Tax Group',
14+
'create' => 'Create Tax Group',
15+
'update' => 'Update Tax Group',
16+
],
17+
'tax-rate' => [
18+
'title' => 'Tax Rate',
19+
'create' => 'Create Tax Rate',
20+
'update' => 'Update Tax Rate',
21+
],
22+
1223
'site-currency' => [
1324
'title' => 'Currency',
1425
'create' => 'Create Currency',

resources/sass/app.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ img {
1919
border: none;
2020
background: none;
2121
}
22-
22+
.extra-product-link {
23+
left: -120px !important;
24+
}
2325
#dataTable tr th:last-of-type {
2426
min-width: 95px;
2527
}

resources/sass/spec/components/index.scss

+1-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
&.header {
2121
background-color: $primary;
2222
color: $white;
23-
2423
}
2524

2625
.avored-table-cell {
2726
padding: 0.5em;
28-
2927
a, i {
3028
color: $white;
3129
}
@@ -39,17 +37,14 @@
3937
.avored-table-row {
4038
&:hover {
4139
background-color: darken($light, 20%);
42-
4340
}
4441

4542
.avored-table-cell {
4643
padding: 0.5em;
47-
4844
a {
4945
color:inherit;
5046
}
5147
}
5248
}
53-
5449
}
55-
}
50+
}

resources/sass/spec/components/sidebar.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
a {
3838
.logo {
3939
background-position: center center;
40+
padding: 15px 10px;
4041
width: $collapsed-size;
4142
}
4243
}
@@ -141,6 +142,7 @@
141142
display: inline-block;
142143
min-height: calc(#{$header-height} - 1px);
143144
width: 100%;
145+
padding: 15px 10px;
144146
width: 70px;
145147
}
146148

@@ -445,4 +447,4 @@
445447
left: 0;
446448
}
447449
}
448-
}
450+
}

resources/views/datagrid/grid.blade.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,8 @@ class="form-control" />
8484
</table>
8585

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

resources/views/forms/select.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
@endforeach
3333
</select>
3434

35-
</div>
35+
</div>

resources/views/layouts/app.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
@include("avored-framework::layouts.nav")
3232
<main class='main-content bgc-grey-100'>
3333
<div id='mainContent'>
34+
@include("avored-framework::layouts.notifications")
3435
<div class="masonry-sizer col-md-6"></div>
3536
<h4 class="c-grey-900 mT-10 mB-30">@yield('page-header')</h4>
3637
@yield('content')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div class="row">
2+
<div class="col-12">
3+
@if(session()->has('errorNotificationText'))
4+
<div class="alert alert-danger alert-dismissible" role="alert">
5+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
6+
<span aria-hidden="true">&times;</span>
7+
</button>
8+
9+
<strong>Error!</strong> {{ session()->get('errorNotificationText') }}
10+
</div>
11+
@endif
12+
13+
14+
@if(session()->has('notificationText'))
15+
<div class="alert alert-success alert-dismissible" role="alert">
16+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
17+
<span aria-hidden="true">&times;</span>
18+
</button>
19+
20+
<strong>Success!</strong> {{ session()->get('notificationText') }}
21+
</div>
22+
@endif
23+
</div>
24+
</div>

resources/views/product/order-status/create.blade.php resources/views/order/order-status/create.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<form action="{{ route('admin.order-status.store') }}" method="post">
1414
@csrf
1515

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

1818
<div class="form-group">
1919
<button class="btn btn-primary" type="submit">

resources/views/product/order-status/edit.blade.php resources/views/order/order-status/edit.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@csrf()
1616
@method('put')
1717

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

2020
<div class="form-group">
2121
<button class="btn btn-primary" type="submit">

resources/views/product/index.blade.php

+19-11
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22

33
@section('content')
44
<h1>
5-
<span class="main-title-wrap">{{ __('avored-framework::lang.product.index.title') }}</span>
6-
<a style="" href="{{ route('admin.product.create') }}" class="btn btn-primary float-right">
7-
{{ __('avored-framework::lang.product.create.text') }}
8-
</a>
9-
</h1>
10-
5+
<span class="main-title-wrap">{{ __('avored-framework::lang.product.index.title') }}</span>
6+
<div class="btn-group float-right" role="group">
7+
<a style="" href="{{ route('admin.product.create') }}" class="btn btn-primary">
8+
{{ __('avored-framework::lang.product.create.text') }}
9+
</a>
1110

12-
<div class="card">
13-
<div class="card-body">
14-
{!! DataGrid::render($dataGrid) !!}
15-
</div>
16-
</div>
11+
<div class="btn-group" role="group">
12+
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
13+
14+
</button>
15+
<div class="dropdown-menu extra-product-link" aria-labelledby="btnGroupDrop1">
16+
<a class="dropdown-item" href="#">Import Product</a>
17+
<a class="dropdown-item" href="{{ route('admin.product.export') }}">Export Product</a>
18+
</div>
19+
</div>
20+
</div>
21+
22+
</h1>
23+
{!! DataGrid::render($dataGrid) !!}
24+
1725
@stop

resources/views/system/site-currency/show.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<tr>
1616
<td>Curreny Code</td>
17-
<td>{{ $siteCurrency->curreny_code }}</td>
17+
<td>{{ $siteCurrency->code }}</td>
1818
</tr>
1919

2020
<tr>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@include('avored-framework::forms.text', ['name' => 'name', 'label' => 'Name'])
2+
@include('avored-framework::forms.textarea', ['name' => 'description', 'label' => 'Description'])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@extends('avored-framework::layouts.app')
2+
3+
@section('content')
4+
5+
<div id="admin-tax-group-page" class="row">
6+
<div class="col-12">
7+
<div class="card">
8+
<div class="card-header">
9+
{{ __('avored-framework::system.tax-group.create') }}
10+
</div>
11+
<div class="card-body">
12+
13+
<form action="{{ route('admin.tax-group.store') }}" method="post">
14+
@csrf
15+
16+
@include('avored-framework::system.tax-group._fields')
17+
18+
<div class="form-group">
19+
<button class="btn btn-primary" type="submit">
20+
{{ __('avored-framework::system.tax-group.create') }}
21+
</button>
22+
<a href="{{ route('admin.tax-group.index') }}" class="btn">
23+
{{ __('avored-framework::lang.cancel') }}
24+
</a>
25+
</div>
26+
27+
</form>
28+
</div>
29+
</div>
30+
31+
</div>
32+
</div>
33+
@endsection
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
@extends('avored-framework::layouts.app')
2+
3+
@section('content')
4+
5+
<div id=admin-admin-state-page class="row">
6+
<div class="col-12">
7+
<div class="card">
8+
<div class="card-header">
9+
{{ __('avored-framework::system.tax-group.update') }}
10+
</div>
11+
<div class="card-body">
12+
<form action="{{ route('admin.tax-group.update', $model->id) }}"
13+
14+
method="post">
15+
@csrf()
16+
@method('put')
17+
18+
@include('avored-framework::system.tax-group._fields')
19+
20+
<div class="form-group">
21+
<button class="btn btn-primary" type="submit">
22+
{{ __('avored-framework::system.tax-group.update') }}
23+
</button>
24+
<a href="{{ route('admin.tax-group.index') }}" class="btn">
25+
{{ __('avored-framework::lang.cancel') }}
26+
</a>
27+
</div>
28+
29+
</form>
30+
</div>
31+
</div>
32+
</div>
33+
</div>
34+
@endsection
35+
36+
@push('scripts')
37+
38+
<script>
39+
40+
var app = new Vue({
41+
el: '#admin-admin-state-page',
42+
data : {
43+
model: {},
44+
autofocus:true,
45+
disabled: true
46+
},
47+
methods: {
48+
changeModelValue: function(val,fieldName) {
49+
this.model[fieldName] = val;
50+
}
51+
}
52+
});
53+
54+
</script>
55+
56+
57+
@endpush
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@extends('avored-framework::layouts.app')
2+
3+
@section('content')
4+
<div class="container-fluid">
5+
<div class="h1">
6+
{{ __('avored-framework::system.tax-group.title') }}
7+
8+
<a href="{{ route('admin.tax-group.create') }}"
9+
class="float-right btn btn-primary">
10+
{{ __('avored-framework::system.tax-group.create') }}
11+
</a>
12+
</div>
13+
14+
{!! DataGrid::render($dataGrid) !!}
15+
16+
</div>
17+
@stop

0 commit comments

Comments
 (0)