Skip to content

Commit

Permalink
Merge pull request #9 from szczepanmasny/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
szczepanmasny authored Feb 25, 2019
2 parents 3702afd + 76cc20e commit 2026a93
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 49 deletions.
2 changes: 1 addition & 1 deletion examples/crm/routes/login/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
redirect="/home"
:localeSelectable="true"
:showLogo="true"
logo="vue-crud-sm.png"
logo="vue-crud-lg.png"
></login-form>
</template>

Expand Down
2 changes: 2 additions & 0 deletions examples/simple-crud/locales/en/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import alerts from './alerts.js'
import routes from './routes.js'
import datatable from './datatable.js'
import details from './details.js'
import itemElements from './item-elements.js'

export default {
global: {
alerts,
routes,
datatable,
details,
itemElements,
Expand Down
5 changes: 5 additions & 0 deletions examples/simple-crud/locales/en/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
demo: {
tasks: 'Tasks'
},
}
68 changes: 20 additions & 48 deletions examples/simple-crud/routes/Crud.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<template>
<crud :meta="meta" :fileMode="true" :prefix="prefix" :path="path" :pageTitle="pageTitle" :fieldsInfo="fieldsInfo"
:detailsTitle="$t('detailsTitle')">
</crud>
<div>
<crud :prefix="prefix" :path="path" :pageTitle="pageTitle" :fieldsInfo="fieldsInfo" :detailsTitle="$t('detailsTitle')">
</crud>
<alert-box></alert-box>
</div>
</template>

<script>
import Crud from '@/utils/crud/components/Crud.vue'
import AlertBox from "@/utils/app/components/AlertBox.vue";
export default {
data() {
return {
prefix: 'crm',
path: 'company-files',
pageTitle: 'crm.companyFiles',
meta: [{
name: 'path',
}]
prefix: 'demo',
path: 'tasks',
pageTitle: 'demo.tasks',
}
},
computed: {
Expand All @@ -26,38 +26,14 @@
details: false,
},
{
type: 'select',
url: 'crm/companies',
list: {
value: 'id',
text: 'common_name',
data: []
},
column: 'company_id',
text: this.$t('fields.company'),
name: 'company',
apiObject: {
name: 'company.common_name',
}
},
{
type: 'file',
column: 'file',
text: this.$t('fields.file'),
name: 'file',
textMode: 'file',
multiedit: false
},
{
type: 'file',
column: 'file_2',
text: this.$t('fields.file2'),
name: 'file_2',
textMode: 'file',
type: 'input',
column: 'name',
text: this.$t('fields.name'),
name: 'name',
multiedit: false
},
{
type: 'textarea',
type: 'input',
column: 'description',
text: this.$t('fields.description'),
name: 'description',
Expand All @@ -66,23 +42,19 @@
]
},
},
methods: {},
components: {
Crud
Crud,
AlertBox,
},
i18n: {
messages: {
en: {
detailsTitle: 'File',
detailsTitle: 'Task',
fields: {
id: 'Id',
company: 'Company',
file: 'File',
file2: 'File 2',
description: 'Description',
type: 'File type',
size: 'Size'
},
name: 'Name',
description: 'Description'
}
}
}
},
Expand Down

0 comments on commit 2026a93

Please sign in to comment.