Skip to content

Commit

Permalink
Merge pull request #115 from avored/dev
Browse files Browse the repository at this point in the history
dev to master
  • Loading branch information
indpurvesh authored Jun 10, 2020
2 parents 3a911b8 + 00d82bf commit c691553
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
10 changes: 2 additions & 8 deletions resources/components/catalog/category/CategorySave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ export default {
props: ['category', 'baseUrl'],
data () {
return {
categoryForm: this.$form.createForm(this),
};
},
methods: {
handleSubmit() {
this.categoryForm.validateFields((err, values) => {
if (err) {
e.preventDefault();
}
});
},
cancelCategory() {
window.location = this.baseUrl + '/category';
}
Expand Down
1 change: 0 additions & 1 deletion resources/components/catalog/category/CategoryTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
button-text="Create"
html-type="link"
:link-url="createUrl">

</avored-button>
</div>
<div class="mt-3">
Expand Down
20 changes: 14 additions & 6 deletions resources/views/catalog/category/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@

@section('content')
<div class="mt-3">
<category-save base-url="{{ asset(config('avored.admin_url')) }}" inline-template>
<category-save
base-url="{{ asset(config('avored.admin_url')) }}"
inline-template>
<div>
<form action="{{ route('admin.category.store') }}" @submit="handleSubmit" method="post">
<form action="{{ route('admin.category.store') }}" method="post">
@csrf
<a-tabs tabbar-gutter="15" tab-position="left" default-active-key="catalog.category.basic">
<a-tabs tabbar-gutter="15" tab-position="left"
default-active-key="catalog.category.info">
@foreach ($tabs as $tab)
<a-tab-pane :force-render="true" tab="{{ $tab->label() }}" key="{{ $tab->key() }}">
<a-tab-pane
:force-render="true"
tab="{{ $tab->label() }}"
key="{{ $tab->key() }}">
@php
$path = $tab->view();
@endphp
Expand All @@ -25,13 +31,15 @@
@endforeach
</a-tabs>

<div class="flex mt-3">
<div class="flex mt-5">
<button type="submit"
class="px-4 py-2 font-semibold leading-7 text-white hover:text-white bg-red-600 rounded hover:bg-red-700">
<svg class="h-4 w-4 inline-block" fill="currentColor" viewBox="0 0 24 24">
<path d="M0 2C0 .9.9 0 2 0h14l4 4v14a2 2 0 01-2 2H2a2 2 0 01-2-2V2zm5 0v6h10V2H5zm6 1h3v4h-3V3z"/>
</svg>
<span class="inline-block">{{ __('avored::system.btn.save') }}</span>
<span class="inline-block">
{{ __('avored::system.btn.save') }}
</span>
</button>

<a
Expand Down
6 changes: 3 additions & 3 deletions resources/views/catalog/category/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<form
method="post"
action="{{ route('admin.category.update', $category->id) }}"
@submit="handleSubmit"

>
@csrf
@method('put')
<a-tabs tabbar-gutter="15" tab-position="left" default-active-key="catalog.category.basic">
<a-tabs tabbar-gutter="15" tab-position="left" default-active-key="catalog.category.info">
@foreach ($tabs as $tab)
<a-tab-pane :force-render="true" tab="{{ $tab->label() }}" key="{{ $tab->key() }}">
@php
Expand All @@ -32,7 +32,7 @@
@endforeach
</a-tabs>

<div class="flex mt-3">
<div class="flex mt-5">
<button type="submit"
class="px-4 py-2 font-semibold leading-7 text-white hover:text-white bg-red-600 rounded hover:bg-red-700">
<svg class="h-4 w-4 inline-block" fill="currentColor" viewBox="0 0 24 24">
Expand Down
1 change: 0 additions & 1 deletion src/System/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class DashboardController
public function index()
{
$orderWidget = Widget::get('avored-total-order');
dd($orderWidget);
$customerWidget = Widget::get('avored-total-customer');
$revenueWidget = Widget::get('avored-total-revenue');

Expand Down

0 comments on commit c691553

Please sign in to comment.