|
22 | 22 | <script src="https://cdn.pkgkit.com/5cd207e2c94eb723c3307764a5693def/awes-io/context-menu/v1.x.x/js/main.js"></script> |
23 | 23 |
|
24 | 24 | <!-- core --> |
25 | | - <script src="https://cdn.pkgkit.com/5cd207e2c94eb723c3307764a5693def/awes-io/base-js/v1.3.15/js/main.js"></script> |
| 25 | + <script src="https://cdn.pkgkit.com/5cd207e2c94eb723c3307764a5693def/awes-io/base-js/v1.x.x/js/main.js"></script> |
26 | 26 | </head> |
27 | 27 | <body> |
28 | | - <div id="awes-app"> |
29 | | - <table-builder store-data="table" row-url="http://company.local-awescrm.de:5051/managers/{id}"> |
| 28 | + <content-wrapper store-data="table" url="/test-data.json"> |
| 29 | + <template slot-scope="table"> |
| 30 | + <table-builder :default="table.data" row-url="http://company.local-awescrm.de:5051/managers/{id}"> |
30 | 31 |
|
31 | | - <template slot="empty"> |
32 | | - <p>You do not have projects Want to create the first one?</p> |
33 | | - </template> |
34 | | - |
35 | | - <template slot="header"> |
36 | | - <h2 style="padding: 1rem; background-color: lightgray"> |
37 | | - Test header block |
38 | | - </h2> |
39 | | - </template> |
40 | | - |
41 | | - <tb-column name="name"> |
42 | | - <template slot-scope="col"> |
43 | | - <div class="ava-text"> |
44 | | - <span v-if="col.data.avatar" v-html="col.data.avatar"></span> |
45 | | - <i v-else class="icon icon-user"></i> |
46 | | - |
47 | | - <span v-if="col.data.active">{{ $get(col.data, 'profile_manager.full_name') }}</span> |
48 | | - <strike v-else>{{ $get(col.data, 'profile_manager.full_name') }}</strike> |
49 | | - </div> |
50 | | - </template> |
51 | | - </tb-column> |
52 | | - <tb-column name="position"> |
53 | | - <template slot-scope="col"> |
54 | | - {{ col.data.profile_manager.position }} |
55 | | - </template> |
56 | | - </tb-column> |
57 | | - <tb-column name="phone" class="int-table__nowrap" media="tablet, desktop"> |
58 | | - <template slot-scope="col"> |
59 | | - <a :href="'tel:' + $get(col.data.phones[0], 'phone_link')"> |
60 | | - {{ $get(col.data.phones[0], 'phone_formatted') }} |
61 | | - </a> |
| 32 | + <template slot="empty"> |
| 33 | + <p>You do not have projects Want to create the first one?</p> |
62 | 34 | </template> |
63 | | - </tb-column> |
64 | | - <tb-column name="email" class="int-table__nowrap" media="desktop"> |
65 | | - <template slot-scope="col"> |
66 | | - <a :href="'mailto:' + col.data.email">{{ col.data.email }}</a> |
| 35 | + |
| 36 | + <template slot="header"> |
| 37 | + <h2 style="padding: 1rem; background-color: lightgray"> |
| 38 | + Test header block |
| 39 | + </h2> |
67 | 40 | </template> |
68 | | - </tb-column> |
69 | 41 |
|
70 | | - <template slot="hidden" slot-scope="h"> |
71 | | - <ul> |
72 | | - <li v-if="h.matchedMedia.includes('mobile')"> |
73 | | - <strong>{{ h.rowData.profile_manager.position }}</strong> |
74 | | - </li> |
75 | | - <li v-if="h.rowData.phones.length"> |
76 | | - <a :href="'tel:' + h.rowData.phones[0].phone_link"> |
77 | | - {{ h.rowData.phones[0].phone_formatted }} |
| 42 | + <tb-column name="name"> |
| 43 | + <template slot-scope="col"> |
| 44 | + <div class="ava-text"> |
| 45 | + <span v-if="col.data.avatar" v-html="col.data.avatar"></span> |
| 46 | + <i v-else class="icon icon-user"></i> |
| 47 | + <component :is="col.data.active ? 'span' : 'strike'"> |
| 48 | + {{ $get(col.data, 'profile_manager.full_name') }} |
| 49 | + </component> |
| 50 | + </div> |
| 51 | + </template> |
| 52 | + </tb-column> |
| 53 | + <tb-column name="position" sort> |
| 54 | + <template slot-scope="col"> |
| 55 | + {{ col.data.profile_manager.position }} |
| 56 | + </template> |
| 57 | + </tb-column> |
| 58 | + <tb-column name="phone" class="int-table__nowrap" media="tablet, desktop"> |
| 59 | + <template slot-scope="col"> |
| 60 | + <a :href="'tel:' + $get(col.data.phones[0], 'phone_link')"> |
| 61 | + {{ $get(col.data.phones[0], 'phone_formatted') }} |
78 | 62 | </a> |
79 | | - </li> |
80 | | - <li><a :href="'mailto:' + h.data.email">{{ h.data.email }}</a></li> |
81 | | - </ul> |
82 | | - </template> |
| 63 | + </template> |
| 64 | + </tb-column> |
| 65 | + <tb-column name="email" sort="mail|mail_down" class="int-table__nowrap" media="desktop"> |
| 66 | + <template slot-scope="col"> |
| 67 | + <a :href="'mailto:' + col.data.email">{{ col.data.email }}</a> |
| 68 | + </template> |
| 69 | + </tb-column> |
| 70 | + |
| 71 | + <template slot="hidden" slot-scope="h"> |
| 72 | + <ul> |
| 73 | + <li v-if="h.matchedMedia.includes('mobile')"> |
| 74 | + <strong>{{ h.rowData.profile_manager.position }}</strong> |
| 75 | + </li> |
| 76 | + <li v-if="h.rowData.phones.length"> |
| 77 | + <a :href="'tel:' + h.rowData.phones[0].phone_link"> |
| 78 | + {{ h.rowData.phones[0].phone_formatted }} |
| 79 | + </a> |
| 80 | + </li> |
| 81 | + <li><a :href="'mailto:' + h.data.email">{{ h.data.email }}</a></li> |
| 82 | + </ul> |
| 83 | + </template> |
83 | 84 |
|
84 | | - <template slot="footer"> |
85 | | - <div style="padding: 1rem; background-color: lightgray"> |
86 | | - Test footer block with <button>no-effect button :)</button> |
87 | | - </div> |
88 | | - </template> |
89 | | - </table-builder> |
| 85 | + <template slot="footer"> |
| 86 | + <div style="padding: 1rem; background-color: lightgray"> |
| 87 | + Test footer block with <button>no-effect button :)</button> |
| 88 | + </div> |
| 89 | + </template> |
| 90 | + </table-builder> |
90 | 91 |
|
91 | | - <paginate-builder |
92 | | - ref="pb" |
93 | | - url="/test-data.json" |
94 | | - store-data="table" |
95 | | - :default="false" |
96 | | - ></paginate-builder> |
97 | | - </div> |
| 92 | + <paginate-builder |
| 93 | + :meta="table.meta" |
| 94 | + ></paginate-builder> |
| 95 | + </template> |
| 96 | + </content-wrapper> |
98 | 97 | </body> |
99 | 98 | </html> |
0 commit comments