This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
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 #49 from wilcorrea-forks/master
- Loading branch information
Showing
12 changed files
with
224 additions
and
71 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
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 |
---|---|---|
|
@@ -23,38 +23,10 @@ export default class AuthService extends API { | |
// return this.post(`/auth/sigin`, {login, password}) | ||
return this.fake({ | ||
token: uniqueKey(), | ||
menus: [ | ||
{ | ||
label: 'Home', | ||
sublabel: '', | ||
icon: 'home', | ||
path: '/dashboard' | ||
}, | ||
{ | ||
label: 'Simple Test', | ||
sublabel: 'Just a simple test ; )', | ||
icon: 'code', | ||
path: '/dashboard/test' | ||
}, | ||
{ | ||
label: 'Test With Hooks', | ||
sublabel: 'Demo to show declare hooks', | ||
icon: 'code', | ||
path: '/dashboard/test-with-hooks' | ||
}, | ||
{ | ||
label: 'Test Template Form', | ||
sublabel: 'Using form control with template', | ||
icon: 'code', | ||
path: '/dashboard/test-with-template/form' | ||
}, | ||
{ | ||
label: 'Test Template Table', | ||
sublabel: 'Using table control with template', | ||
icon: 'code', | ||
path: '/dashboard/test-with-template/table' | ||
} | ||
] | ||
user: { | ||
name: 'William Correa', | ||
email: '[email protected]' | ||
} | ||
}) | ||
} | ||
|
||
|
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,5 @@ | ||
/** | ||
* @param {AppRouter} router | ||
* @returns {Array} | ||
*/ | ||
export const routes = (router) => [] |
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,13 @@ | ||
import test from 'src/domains/Example/Test/Routes' | ||
import testWithHooks from 'src/domains/Example/TestWithHooks/Routes' | ||
import testWithTemplate from 'src/domains/Example/TestWithTemplate/Routes' | ||
|
||
/** | ||
* @param {AppRouter} router | ||
* @returns {Array} | ||
*/ | ||
export const routes = (router) => [ | ||
...test(router), | ||
...testWithHooks(router), | ||
...testWithTemplate(router) | ||
] |
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
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,76 @@ | ||
<template> | ||
<q-list padding> | ||
<q-item-label header> | ||
{{ header }} | ||
</q-item-label> | ||
<template v-for="(item, index) in menu"> | ||
<q-expansion-item | ||
v-if="item.children" | ||
:key="`expansion-item-${index}`" | ||
:icon="item.icon" | ||
:label="item.label" | ||
:caption="item.sublabel" | ||
> | ||
<dashboard-menu-item | ||
v-for="(element, key) in item.children" | ||
:key="key" | ||
:item="element" | ||
@click="click" | ||
/> | ||
</q-expansion-item> | ||
|
||
<dashboard-menu-item | ||
v-else | ||
:key="`menu-item-${index}`" | ||
:item="item" | ||
@click="click" | ||
/> | ||
</template> | ||
</q-list> | ||
</template> | ||
|
||
<script type="text/javascript"> | ||
import DashboardMenuItem from 'src/modules/Dashboard/Components/DashboardMenuItem' | ||
/** | ||
*/ | ||
export default { | ||
/** | ||
*/ | ||
name: 'DashboardMenu', | ||
/** | ||
*/ | ||
components: { DashboardMenuItem }, | ||
/** | ||
*/ | ||
props: { | ||
header: { | ||
type: String, | ||
default: '' | ||
}, | ||
menu: { | ||
type: Array, | ||
default: () => [] | ||
} | ||
}, | ||
/** | ||
*/ | ||
methods: { | ||
/** | ||
* @param {Object} item | ||
*/ | ||
click (item) { | ||
this.$emit('click', item) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style | ||
lang="stylus" | ||
scoped | ||
> | ||
>>> .q-expansion-item__content | ||
.q-item.q-item-type | ||
padding 8px 16px 8px 24px | ||
</style> |
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,55 @@ | ||
<template> | ||
<q-item | ||
@click.native="click" | ||
clickable | ||
> | ||
<q-item-section | ||
v-if="item.icon" | ||
avatar | ||
> | ||
<q-icon :name="item.icon" /> | ||
</q-item-section> | ||
<q-item-section> | ||
<q-item-label>{{ item.label }}</q-item-label> | ||
<q-item-label | ||
v-if="item.sublabel" | ||
caption | ||
> | ||
{{ item.sublabel }} | ||
</q-item-label> | ||
</q-item-section> | ||
</q-item> | ||
</template> | ||
|
||
<script type="text/javascript"> | ||
/** | ||
*/ | ||
export default { | ||
/** | ||
*/ | ||
name: 'DashboardMenuItem', | ||
/** | ||
*/ | ||
props: { | ||
/** | ||
*/ | ||
item: { | ||
type: Object, | ||
required: true | ||
} | ||
}, | ||
/** | ||
*/ | ||
methods: { | ||
/** | ||
*/ | ||
click () { | ||
this.$emit('click', this.item) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
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,45 @@ | ||
export default [ | ||
{ | ||
label: 'Presentation', | ||
sublabel: '', | ||
icon: 'home', | ||
path: '/dashboard' | ||
}, | ||
{ | ||
label: 'Doc', | ||
sublabel: '', | ||
icon: 'school', | ||
path: '/dashboard/docs' | ||
}, | ||
{ | ||
label: 'Examples', | ||
sublabel: '', | ||
icon: 'code', | ||
children: [ | ||
{ | ||
label: 'Simple Test', | ||
sublabel: 'Just a simple test ; )', | ||
icon: 'code', | ||
path: '/dashboard/test' | ||
}, | ||
{ | ||
label: 'Test With Hooks', | ||
sublabel: 'Demo to show declare hooks', | ||
icon: 'code', | ||
path: '/dashboard/test-with-hooks' | ||
}, | ||
{ | ||
label: 'Test Template Form', | ||
sublabel: 'Using form control with template', | ||
icon: 'code', | ||
path: '/dashboard/test-with-template/form' | ||
}, | ||
{ | ||
label: 'Test Template Table', | ||
sublabel: 'Using table control with template', | ||
icon: 'code', | ||
path: '/dashboard/test-with-template/table' | ||
} | ||
] | ||
} | ||
] |
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