Skip to content

Commit 6a2d390

Browse files
committed
update
1 parent d991f5c commit 6a2d390

File tree

10 files changed

+525
-125
lines changed

10 files changed

+525
-125
lines changed

src/_nav.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,34 @@ export default {
1010
},
1111
{
1212
name: 'Job Tickets',
13-
url: '/notifications',
13+
url: '/tickets/list',
1414
icon: 'icon-bell',
1515
children: [
1616
{
1717
name: 'Open',
18-
url: '/base/tables',
18+
url: '/tickets/list',
1919
icon: 'icon-puzzle'
2020
},
2121
{
2222
name: 'Assinged to Me',
23-
url: '/base/cards',
23+
url: '/tickets/list',
2424
icon: 'icon-puzzle'
2525
},
2626
{
2727
name: 'Due Today',
28-
url: '/base/carousels',
28+
url: '/tickets/list',
2929
icon: 'icon-puzzle'
3030
},
3131
{
3232
name: 'Ready to Invoice',
33-
url: '/base/carousels',
33+
url: '/tickets/list',
3434
icon: 'icon-puzzle'
3535
}]
3636
},
37-
3837
{
3938
name: 'Customers',
40-
url: '/theme/typography',
41-
icon: 'icon-pencil'
39+
url: '/customers',
40+
icon: 'icon-user'
4241
},
4342
{
4443
name: 'Products',
@@ -47,7 +46,7 @@ export default {
4746
children: [
4847
{
4948
name: 'Items',
50-
url: '/base/tables',
49+
url: '#',
5150
icon: 'icon-puzzle'
5251
},
5352
{
@@ -77,7 +76,7 @@ export default {
7776
},
7877
{
7978
name: 'Invoices',
80-
url: '/charts',
79+
url: '/invoices',
8180
icon: 'icon-pie-chart'
8281
},{
8382
name: 'Estimates',
@@ -173,12 +172,6 @@ export default {
173172
icon: 'icon-cloud-download',
174173
class: 'mt-auto',
175174
variant: 'success'
176-
},
177-
{
178-
name: 'Try CoreUI PRO',
179-
url: 'http://coreui.io/pro/vue/',
180-
icon: 'icon-layers',
181-
variant: 'danger'
182175
}
183176
]
184177
}

src/containers/DefaultContainer.vue

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
<img class="navbar-brand-minimized" src="img/ov_logo.png" height="30" alt="CoreUI Logo">
88
</b-link>
99
<SidebarToggler class="d-md-down-none" display="lg" />
10-
<b-form-group
11-
label-for="lgInput"
12-
label-size="lg"
13-
:label-cols="0"
14-
:horizontal="true">
15-
<b-form-input id="lgInput" type="text" size="lg" placeholder="Search"></b-form-input>
16-
</b-form-group>
10+
<div class="col-lg-6 d-md-down-none">
11+
<b-form-input type="text" placeholder="Search.." size="lg" ></b-form-input></div>
1712
<b-navbar-nav class="ml-auto">
1813
<b-nav-item class="d-md-down-none">
1914
<i class="icon-bell"></i>
@@ -52,12 +47,12 @@
5247
<TheFooter>
5348
<!--footer-->
5449
<div>
55-
<a href="https://coreui.io">CoreUI</a>
56-
<span class="ml-1">&copy; 2018 creativeLabs.</span>
50+
<a href="https://Olsonvisual.com">Olsonvisual</a>
51+
<span class="ml-1">&copy; 2018.</span>
5752
</div>
5853
<div class="ml-auto">
5954
<span class="mr-1">Powered by</span>
60-
<a href="https://coreui.io">CoreUI for Vue</a>
55+
<a href="https://Olsonvisual.com">Custom ERP</a>
6156
</div>
6257
</TheFooter>
6358
</div>

src/router/index.js

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import Vue from 'vue'
22
import Router from 'vue-router'
33
const TicketList = () => import('@/views/base/TicketList')
4+
const TicketView = () => import('@/views/tickets/View.vue')
5+
6+
const InvoiceList = () => import('@/views/base/InvoiceList')
7+
const CustomerList = () => import('@/views/base/CustomerList')
8+
49

510
// Containers
611
const DefaultContainer = () => import('@/containers/DefaultContainer')
@@ -127,10 +132,46 @@ export default new Router({
127132
},
128133
]
129134
},
135+
{
136+
path: 'invoices',
137+
name: 'Invoices',
138+
component: InvoiceList
139+
140+
},{
141+
path: 'customers',
142+
name: 'Customers',
143+
component: CustomerList
144+
145+
},
146+
{
147+
path: 'tickets',
148+
redirect: '/tickets/list',
149+
name: 'Job Tickets',
150+
component: {
151+
render (c) { return c('router-view') }
152+
},
153+
children: [
154+
{
155+
path: 'list',
156+
name: 'Tickets',
157+
component: TicketList
158+
},
159+
{
160+
path: 'create',
161+
name: 'New Ticket',
162+
component: Forms
163+
},
164+
{
165+
path: 'view',
166+
name: 'View',
167+
component: TicketView
168+
}
169+
]
170+
},
130171
{
131172
path: 'base',
132173
redirect: '/base/cards',
133-
name: 'Base',
174+
name: 'Job Tickets',
134175
component: {
135176
render (c) { return c('router-view') }
136177
},
@@ -151,8 +192,8 @@ export default new Router({
151192
component: Switches
152193
},
153194
{
154-
path: 'tables',
155-
name: 'Tables',
195+
path: 'tickets',
196+
name: 'Tickets',
156197
component: TicketList
157198
},
158199
{

src/views/base/CustomerList.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<div class="animated fadeIn">
3+
<b-form-group>
4+
<b-input-group>
5+
<!-- Attach Left button -->
6+
<b-input-group-prepend>
7+
<b-button variant="primary">
8+
<i class="fa fa-search"></i> Search
9+
</b-button>
10+
</b-input-group-prepend>
11+
<b-form-input type="text" placeholder="Customer name"></b-form-input>
12+
</b-input-group>
13+
</b-form-group>
14+
15+
<b-row>
16+
17+
<b-col lg="12">
18+
<c-table striped caption="<i class='fa fa-align-justify'></i> Customers"></c-table>
19+
</b-col><!--/.col-->
20+
</b-row><!--/.row-->
21+
22+
23+
</div>
24+
25+
</template>
26+
27+
<script>
28+
import cTable from './CustomerTable.vue'
29+
30+
export default {
31+
name: 'tables',
32+
components: {cTable}
33+
}
34+
</script>

src/views/base/CustomerTable.vue

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<template>
2+
<b-card :header="caption">
3+
<b-table :hover="hover" :striped="striped" :bordered="bordered" :small="small" :fixed="fixed" responsive="sm"
4+
:items="items" :fields="fields" :current-page="currentPage" :per-page="perPage">
5+
<template slot="status" slot-scope="data">
6+
<b-badge :variant="getBadge(data.item.status)">{{data.item.status}}</b-badge>
7+
</template>
8+
</b-table>
9+
<nav>
10+
<b-pagination :total-rows="getRowCount(items)" :per-page="perPage" v-model="currentPage" prev-text="Prev"
11+
next-text="Next" hide-goto-end-buttons/>
12+
</nav>
13+
</b-card>
14+
</template>
15+
16+
<script>
17+
/**
18+
* Randomize array element order in-place.
19+
* Using Durstenfeld shuffle algorithm.
20+
*/
21+
const shuffleArray = (array) => {
22+
for (let i = array.length - 1; i > 0; i--) {
23+
let j = Math.floor(Math.random() * (i + 1))
24+
let temp = array[i]
25+
array[i] = array[j]
26+
array[j] = temp
27+
}
28+
return array
29+
}
30+
31+
export default {
32+
name: 'c-table',
33+
props: {
34+
caption: {
35+
type: String,
36+
default: 'Table'
37+
},
38+
hover: {
39+
type: Boolean,
40+
default: false
41+
},
42+
striped: {
43+
type: Boolean,
44+
default: false
45+
},
46+
bordered: {
47+
type: Boolean,
48+
default: false
49+
},
50+
small: {
51+
type: Boolean,
52+
default: false
53+
},
54+
fixed: {
55+
type: Boolean,
56+
default: false
57+
}
58+
},
59+
data: () => {
60+
return {
61+
items: shuffleArray([
62+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
63+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
64+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
65+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
66+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
67+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
68+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
69+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
70+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
71+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
72+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
73+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
74+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
75+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
76+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
77+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
78+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
79+
{username: 'Paramount Picture Marketing', category: 'Entertainment', jobid: '805553',salesperson:'Dan Olson'},
80+
81+
82+
]),
83+
fields: [
84+
{key: 'jobid', label: 'Customer#'},
85+
{key: 'username', label: 'Client'},
86+
{key: 'category', label: 'Category'},
87+
{key: 'salesperson', label: 'Sales Person'},
88+
89+
90+
],
91+
currentPage: 1,
92+
perPage: 10,
93+
totalRows: 0
94+
}
95+
},
96+
methods: {
97+
getBadge(status) {
98+
return status === 'Active' ? 'success'
99+
: status === 'Inactive' ? 'secondary'
100+
: status === 'Pending' ? 'warning'
101+
: status === 'Banned' ? 'danger' : 'primary'
102+
},
103+
getRowCount(items) {
104+
return items.length
105+
}
106+
}
107+
}
108+
</script>

src/views/base/InvoiceList.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<template>
2+
<div class="animated fadeIn">
3+
4+
<b-row>
5+
6+
<b-col lg="12">
7+
<c-table striped caption="<i class='fa fa-align-justify'></i> Invoices"></c-table>
8+
</b-col><!--/.col-->
9+
</b-row><!--/.row-->
10+
11+
12+
</div>
13+
14+
</template>
15+
16+
<script>
17+
import cTable from './InvoiceTable.vue'
18+
19+
export default {
20+
name: 'tables',
21+
components: {cTable}
22+
}
23+
</script>

0 commit comments

Comments
 (0)