-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from avored/dev
merging dev to master
- Loading branch information
Showing
93 changed files
with
3,994 additions
and
1,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use Faker\Generator as Faker; | ||
use AvoRed\Framework\Models\Database\Role; | ||
|
||
$factory->define(AvoRed\Framework\Models\Database\AdminUser::class, function (Faker $faker) { | ||
|
||
$role = factory(Role::class)->create(); | ||
return [ | ||
'first_name' => $faker->firstName, | ||
'last_name' => $faker->lastName, | ||
'email' => $faker->email, | ||
'password' => bcrypt($faker->phoneNumber), | ||
'role_id' => $role->id, | ||
'is_super_admin' => rand(0,1), | ||
'image_path' => null | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
use Faker\Generator as Faker; | ||
|
||
$factory->define(AvoRed\Framework\Models\Database\Language::class, function (Faker $faker) { | ||
$name = $faker->text(5); | ||
return [ | ||
'name' => $name, | ||
'code' => str_slug($name), | ||
'is_default' => 0 | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<div class="d-table w-100"> | ||
<div class="d-flex text-white bg-dark flex-row "> | ||
<div | ||
class="flex-shrink-1 font-weight-bold align-self-start pt-3 pr-3 pb-3 pl-3" | ||
v-for="column in columns" :key="column.key"> | ||
{{ column.label }} | ||
</div> | ||
</div> | ||
<div class="d-flex flex-row" v-for="item in items" :key="item.id"> | ||
<div | ||
class="flex-shrink-1 align-self-start pt-2 pr-3 pb-2 pl-3" | ||
v-for="col in columns" :key="col.key" | ||
> | ||
{{ render(item, col.key) }} | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
'columns': {required : true, type : Array}, | ||
'actions': { required: false }, | ||
'items': {required : true, type : Array} | ||
}, | ||
data() { | ||
return { | ||
} | ||
}, | ||
methods: { | ||
render(item, key) { | ||
//return "test"; | ||
return item[key]; | ||
} | ||
}, | ||
created() { | ||
//this.items = JSON.parse(this.data); | ||
//this.columnsData = JSON.parse(this.columns); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
menuActive: false | ||
} | ||
}, | ||
methods: { | ||
dropdownSidebarNav() { | ||
this.menuActive = !this.menuActive; | ||
} | ||
} | ||
} | ||
</script> |
69 changes: 69 additions & 0 deletions
69
resources/components/product/category/CategoryFieldPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<script> | ||
import isNil from 'lodash/isNil'; | ||
export default { | ||
props: ['category'], | ||
data() { | ||
return { | ||
name: '', | ||
meta_title: '', | ||
meta_description: '', | ||
categoryData: {}, | ||
cardBody: { | ||
basic: true, | ||
seo: true | ||
}, | ||
linkTitle: { | ||
basic: false, | ||
seo: false | ||
} | ||
} | ||
}, | ||
methods: { | ||
sanitizeName: function(name) { | ||
return name.toLowerCase().replace(/\s*$/g, '').replace(/\s+/g, '-'); | ||
}, | ||
toggleCard(type) { | ||
for (var cardId in this.linkTitle) { | ||
if(!this.linkTitle.hasOwnProperty(cardId)) continue; | ||
this.linkTitle[cardId] = false; | ||
this.cardBody[cardId] = false; | ||
} | ||
this.cardBody[type] = !this.cardBody[type]; | ||
this.linkTitle[type] = !this.linkTitle[type]; | ||
}, | ||
openAllCardLink() { | ||
for (var cardId in this.linkTitle) { | ||
if(!this.linkTitle.hasOwnProperty(cardId)) continue; | ||
this.linkTitle[cardId] = false; | ||
this.cardBody[cardId] = true; | ||
} | ||
}, | ||
changeLanguage(event) { | ||
window.location = event.target.selectedOptions[0].getAttribute('data-url'); | ||
} | ||
}, | ||
computed: { | ||
slug() { | ||
return this.sanitizeName(this.name); | ||
}, | ||
openAllCard() { | ||
if (this.linkTitle.basic === true || this.linkTitle.seo === true) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
}, | ||
mounted () { | ||
this.categoryData = JSON.parse(this.category); | ||
this.name = isNil(this.categoryData.name) ? '' : this.categoryData.name; | ||
this.meta_title = this.categoryData.meta_title; | ||
this.meta_description = this.categoryData.meta_description; | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
email: '', | ||
password: '' | ||
} | ||
}, | ||
computed: { | ||
isLoginDisbled: function() { | ||
if(this.email != "" && this.password != "") { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
email: '' | ||
} | ||
}, | ||
computed: { | ||
isSubmitButtonDisbled: function() { | ||
if(this.email != "") { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
email: '', | ||
password: '', | ||
confirm_password: '' | ||
} | ||
}, | ||
computed: { | ||
isSubmitDisbled: function() { | ||
if(this.email != "" && this.password != "" && this.confirm_password != '' | ||
&& (this.password == this.confirm_password)) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
/** | ||
* 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. | ||
*/ | ||
|
||
//window._ = require('lodash'); | ||
//require('popper.js'); | ||
|
||
try { | ||
//window.$ = window.jQuery = require('jquery'); | ||
//require('bootstrap'); | ||
|
||
} catch (e) {} | ||
|
||
//require('select2'); | ||
//require('pc-bootstrap4-datetimepicker'); | ||
//require('chartjs'); | ||
//require('sweetalert'); | ||
//require('jquery-sortable'); | ||
|
||
//window.SimpleMDE = require('simplemde'); | ||
|
||
|
||
window.Vue = require('vue'); | ||
window.axios = require('axios'); | ||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; | ||
|
||
let token = document.head.querySelector('meta[name="csrf-token"]'); | ||
if (token) { | ||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; | ||
} | ||
|
||
Vue.component('datagrid', require('../components/datagrid/DataGrid.vue').default); | ||
Vue.component('sidebar-dropdown', require('../components/layout/SideBarDropdown.vue').default); | ||
Vue.component('login-page', require('../components/user/auth/LoginPage.vue').default); | ||
Vue.component('password-reset-page', require('../components/user/auth/PasswordResetPage.vue').default); | ||
Vue.component('set-new-password-page', require('../components/user/auth/SetNewPasswordPage.vue').default); | ||
Vue.component('category-field-page', require('../components/product/category/CategoryFieldPage.vue').default); | ||
|
||
//require('./bootstrap'); | ||
|
||
/** | ||
* 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', | ||
data: { | ||
toggleSideBarData: true, | ||
displayProfileHeaderMenu: false | ||
}, | ||
methods: { | ||
toggleSidebar() { | ||
this.toggleSideBarData = !this.toggleSideBarData; | ||
}, | ||
clickOnProfileHeaderLink() { | ||
this.displayProfileHeaderMenu = !this.displayProfileHeaderMenu; | ||
} | ||
} | ||
}); |
Oops, something went wrong.