diff --git a/.env.development b/.env.development
index 13c95d3..fea6886 100644
--- a/.env.development
+++ b/.env.development
@@ -6,7 +6,7 @@ LANG_DEFAULT='it'
MONGODB_HOST='http://localhost:3000'
PAO_APP_ID='KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF'
MASTER_KEY='KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T'
-LOGO_REG='quasar-logo-full.svg'
+LOGO_REG='freeplanet-logo-full.svg'
TEST_EMAIL='paolo.arena77@gmail.com'
TEST_USERNAME='paoloar77'
TEST_PASSWORD='mypassword@1A'
diff --git a/package-lock.json b/package-lock.json
index 74763de..0c3bf32 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10611,6 +10611,11 @@
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
"dev": true
},
+ "gsap": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/gsap/-/gsap-2.0.2.tgz",
+ "integrity": "sha512-WyT0uuDNb+5xMccx4SsVcI1CwvIL0BPgP8TyJJmMWT/btGXUNtKesnkXFMMshYs37renFhDo1P5NEoizeonviQ=="
+ },
"gzip-size": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz",
@@ -13267,6 +13272,11 @@
"topo": "3.0.3"
}
},
+ "jquery": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
+ "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
+ },
"js-base64": {
"version": "2.4.9",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
@@ -22397,6 +22407,11 @@
"is-plain-obj": "1.1.0"
}
},
+ "sortablejs": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.7.0.tgz",
+ "integrity": "sha1-gKKyNwq9Vo4c7IwnETHvMKkE+ig="
+ },
"source-list-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
@@ -24377,6 +24392,14 @@
"integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==",
"dev": true
},
+ "vuedraggable": {
+ "version": "2.17.0",
+ "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.17.0.tgz",
+ "integrity": "sha512-TAC5tJTSbHSINQCSB59qHnuzT0Ad+E3IgvSWuA1e9UaebD8DxKaY1tCdvL3XvuLoaM3wc1dhpP/NbjpdxYsrng==",
+ "requires": {
+ "sortablejs": "1.7.0"
+ }
+ },
"vueify": {
"version": "9.4.1",
"resolved": "https://registry.npmjs.org/vueify/-/vueify-9.4.1.tgz",
diff --git a/package.json b/package.json
index d0192e6..f48f25a 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,8 @@
"google-translate-api": "^2.3.0",
"graphql": "^0.13.2",
"graphql-tag": "^2.8.0",
+ "gsap": "^2.0.2",
+ "jquery": "^3.3.1",
"js-cookie": "^2.2.0",
"localforage": "^1.7.3",
"normalize.css": "^8.0.0",
@@ -44,6 +46,7 @@
"vue-property-decorator": "^7.2.0",
"vue-router": "^3.0.1",
"vue-svgicon": "^3.1.0",
+ "vuedraggable": "^2.17.0",
"vuelidate": "^0.7.4",
"vuex": "^3.0.1",
"vuex-class": "^0.3.1",
diff --git a/quasar.conf.js b/quasar.conf.js
index e148d2f..8183b7e 100644
--- a/quasar.conf.js
+++ b/quasar.conf.js
@@ -118,11 +118,13 @@ module.exports = function (ctx) {
'QToolbar',
'QToolbarTitle',
'QBtn',
+ 'QBtnDropdown',
'QIcon',
'QList',
'QListHeader',
'QItem',
'QItemMain',
+ 'QItemTile',
'QItemSide',
'QCard',
'QCardTitle',
@@ -182,31 +184,16 @@ module.exports = function (ctx) {
description: 'Social project in order to connecting people each others (working in progress...)',
display: 'standalone',
orientation: 'portrait',
+ theme_color: '#ffffff',
background_color: '#ffffff',
- theme_color: '#027be3',
icons: [
{
- 'src': 'statics/icons/icon-128x128.png',
- 'sizes': '128x128',
- 'type': 'image/png'
- },
- {
- 'src': 'statics/icons/icon-192x192.png',
+ 'src': 'statics/icons/android-chrome-192x192.png',
'sizes': '192x192',
'type': 'image/png'
},
{
- 'src': 'statics/icons/icon-256x256.png',
- 'sizes': '256x256',
- 'type': 'image/png'
- },
- {
- 'src': 'statics/icons/icon-384x384.png',
- 'sizes': '384x384',
- 'type': 'image/png'
- },
- {
- 'src': 'statics/icons/icon-512x512.png',
+ 'src': 'statics/icons/android-chrome-512x512',
'sizes': '512x512',
'type': 'image/png'
}
diff --git a/src/assets/quasar-logo-full.svg b/src/assets/quasar-logo-full.svg
deleted file mode 100644
index 30d7561..0000000
--- a/src/assets/quasar-logo-full.svg
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
diff --git a/src/components/categories/SingleCat/SingleCat.ts b/src/components/categories/SingleCat/SingleCat.ts
index 900000c..5d61c5a 100644
--- a/src/components/categories/SingleCat/SingleCat.ts
+++ b/src/components/categories/SingleCat/SingleCat.ts
@@ -1,8 +1,6 @@
import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator'
-require('./SingleCat.scss')
-
import { ICategory } from '../../../model/index'
@Component({
diff --git a/src/components/categories/SingleCat/SingleCat.vue b/src/components/categories/SingleCat/SingleCat.vue
index fbcc2ed..2ea4518 100644
--- a/src/components/categories/SingleCat/SingleCat.vue
+++ b/src/components/categories/SingleCat/SingleCat.vue
@@ -17,3 +17,7 @@
+
+
diff --git a/src/components/categories/category/category.ts b/src/components/categories/category/category.ts
index f5806cf..fa2f45e 100644
--- a/src/components/categories/category/category.ts
+++ b/src/components/categories/category/category.ts
@@ -4,8 +4,6 @@ import { Component, Watch } from 'vue-property-decorator'
import { SingleCat } from '@components'
import { ICategory } from '@src/model'
-require('./category.scss')
-
@Component({
components: { SingleCat }
@@ -25,13 +23,15 @@ export default class Category extends Vue {
id: 0,
descr_it: 'Frozen Yogurt',
descr_en: '',
- descr_es: ''
+ descr_es: '',
+ campo2bool: true
},
{
id: 1,
descr_it: 'Secondo',
descr_en: '',
- descr_es: ''
+ descr_es: '',
+ campo2bool: false
}]
columns: any [] = [
@@ -59,6 +59,14 @@ export default class Category extends Vue {
field: 'descr_es',
sortable: true,
classes: 'my-class',
+ },
+ {
+ name: 'campo2bool',
+ label: 'campo2bool',
+ align: 'left',
+ field: 'campo2bool',
+ sortable: true,
+ classes: 'my-class',
}
]
@@ -82,7 +90,8 @@ export default class Category extends Vue {
const objcat: ICategory = {
descr_it: '',
descr_en: '',
- descr_es: ''
+ descr_es: '',
+ campo2bool: true
}
return objcat
diff --git a/src/components/categories/category/category.vue b/src/components/categories/category/category.vue
index 9cce5a3..1d9eff6 100644
--- a/src/components/categories/category/category.vue
+++ b/src/components/categories/category/category.vue
@@ -53,7 +53,7 @@
-
+
@@ -61,3 +61,7 @@
+
+
diff --git a/src/components/categories/index.ts b/src/components/categories/index.ts
index a391328..fb62135 100644
--- a/src/components/categories/index.ts
+++ b/src/components/categories/index.ts
@@ -1,2 +1,3 @@
export * from './SingleCat'
export * from './category'
+export * from './tabledata'
diff --git a/src/components/categories/tabledata/index.ts b/src/components/categories/tabledata/index.ts
new file mode 100644
index 0000000..5825f39
--- /dev/null
+++ b/src/components/categories/tabledata/index.ts
@@ -0,0 +1 @@
+export {default as TableData} from './tabledata.vue'
diff --git a/src/components/categories/tabledata/tabledata.scss b/src/components/categories/tabledata/tabledata.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/components/categories/tabledata/tabledata.ts b/src/components/categories/tabledata/tabledata.ts
new file mode 100644
index 0000000..7bb46c1
--- /dev/null
+++ b/src/components/categories/tabledata/tabledata.ts
@@ -0,0 +1,204 @@
+import Vue from 'vue'
+import { Component, Watch } from 'vue-property-decorator'
+
+import { ICategory } from '@src/model'
+
+@Component({
+})
+export default class Tabledata extends Vue {
+ $q: any
+
+ filter: boolean = false
+ title: string = ''
+ category: string = ''
+ categories_loc: any[] = [{}]
+ categories_arr: any[] = [{}]
+ selected: any [] = []
+ selectedSecond: any [] = []
+
+ data: any [] = [{
+ id: 0,
+ descr_it: 'Frozen Yogurt',
+ descr_en: '',
+ descr_es: ''
+ },
+ {
+ id: 1,
+ descr_it: 'Secondo',
+ descr_en: '',
+ descr_es: ''
+ }]
+
+ columns: any [] = [
+ {
+ name: 'descr_it',
+ required: true,
+ label: 'IT',
+ align: 'left',
+ field: 'descr_it',
+ sortable: true,
+ classes: 'my-class',
+ },
+ {
+ name: 'descr_en',
+ label: 'EN',
+ align: 'left',
+ field: 'descr_en',
+ sortable: true,
+ classes: 'my-class',
+ },
+ {
+ name: 'descr_es',
+ label: 'ES',
+ align: 'left',
+ field: 'descr_es',
+ sortable: true,
+ classes: 'my-class',
+ },
+ {
+ name: 'campo2bool',
+ label: 'campo2bool',
+ align: 'left',
+ field: 'campo2bool',
+ sortable: true,
+ classes: 'my-class',
+ }
+ ]
+
+ @Watch('categories_loc') valueChanged() {
+ this.updatetable()
+ }
+
+
+ created() {
+ this.loadCat()
+ }
+
+ async loadCat() {
+ await this.$db.categories.toArray().then(ris => this.categories_loc = ris)
+
+ this.updatetable()
+ }
+
+ initcat() {
+
+ const objcat: ICategory = {
+ descr_it: '',
+ descr_en: '',
+ descr_es: '',
+ campo2bool: false
+ }
+ return objcat
+
+ }
+
+ async insertCategory() {
+
+ const objcat = this.initcat()
+
+ let myid = 0
+ objcat.descr_it = this.category
+
+ // Add to Indexdb
+ await this.$db.categories.add(objcat
+ ).then(ris => {
+ myid = ris
+ })
+
+ objcat.id = myid
+
+ // Add into the memory
+ this.categories_loc.push(objcat)
+
+ // empty the field
+ this.category = ''
+ }
+
+ async deleteCategory(myarrobj) {
+
+ await myarrobj.forEach(myobj => {
+
+ if (myobj.id !== undefined) {
+ console.log('KEY = ', myobj.id)
+
+ // Delete item
+ let deleteCount = this.$db.categories
+ .where('id').equals(myobj.id)
+ .delete()
+
+ console.log('deleteCount = ', deleteCount)
+ if (deleteCount > 0) {
+ // Remove into the memory
+ this.categories_loc.splice(this.categories_loc.indexOf(myobj), 1)
+
+ this.updatetable()
+
+ return deleteCount
+ }
+ }
+ })
+
+ }
+
+ updatetable() {
+
+ this.filterCategories()
+ this.categories_arr = [...this.categories_loc]
+
+ }
+
+ async filterCategories() {
+
+ if (this.filter) {
+ // #Todo If need to filter the output database ...
+ this.$db.categories
+ .where('descr_it').notEqual('nonlovedi')
+ .toArray()
+ .then((response) => {
+ Promise.all(response.map(key => key))
+ .then((myarr) => {
+ this.categories_loc = [...myarr]
+ return this.categories_loc
+ })
+ })
+ } else {
+ return this.categories_loc
+ }
+ }
+
+ deleteRow() {
+ console.log('SEL = ', this.selectedSecond)
+
+ const seldel = [...this.selectedSecond]
+ if (this.deleteCategory(this.selectedSecond)) {
+ this.$q.notify({
+ color: 'primary',
+ icon: 'delete',
+ message: `Deleted ` + (seldel.length.toString()) + ' item'
+ })
+
+
+ }
+
+ }
+
+ /*
+ await db.transaction('rw', [db.friends], async () => {
+ const friend = await db.friends.get(1);
+ ++friend.age;
+ await db.friends.put(friend);
+ });
+ */
+
+ async modify() {
+ // esempio da sistemare
+ await this.$db.transaction('rw', [this.$db.categories], async () => {
+ const friend = await this.$db.get(1)
+ ++friend.age
+ await this.$db.put(friend)
+ })
+
+ }
+
+
+}
diff --git a/src/components/categories/tabledata/tabledata.vue b/src/components/categories/tabledata/tabledata.vue
new file mode 100644
index 0000000..3ed1aac
--- /dev/null
+++ b/src/components/categories/tabledata/tabledata.vue
@@ -0,0 +1,65 @@
+
+ Table Data:
+
-
-
+
-
-
+
-
-
-