check box and edit filter

pull/1/head
Saeid 5 years ago
parent e6116e9d12
commit a7da01e23f

1
.gitignore vendored

@ -3,6 +3,7 @@
/storage/*.key
/vendor
/modules
/development/
.env
.phpunit.result.cache
Homestead.json

@ -25,7 +25,8 @@
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^7.0",
"zircote/swagger-php": "^3.0"
},
"config": {
"optimize-autoloader": true,

564
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
{
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=f7a4211f63d8c9b0e866",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=16ec31ea2fe142f759a2",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=a34424bae779351e8015",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=9b9201bf682c177f6a9c"
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=c0dad36c5b62e25c181a",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=dfef9cd82f38d626bd59",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=df5383183b662623e128",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=d2f6a49dd0b581e57419"
}

@ -2,17 +2,17 @@
<div class="WM-Checkbox c-toggle-hide RTL WM-Align-R">
<input
type="checkbox"
:id="ItemID"
:id="rand"
class="c-check"
:value="ItemID"
:value="valueSelected"
v-model="values"
@change="changeValue"
/>
<label :for="ItemID">
<label :for="rand">
<span class="inc"></span>
<span class="check"></span>
<span class="box"></span>
{{ ItemText }}
{{ showText }}
</label>
</div>
</template>
@ -20,27 +20,45 @@
<script>
export default {
props: {
ItemID: { default: "Checkbox" },
ItemText: { default: " مقدار پیش فرض " },
itemValue: { default: null },
itemText: { default: null },
text: { default: " " },
item: { default: {} },
color: { default: "Red" },
value: {type: Array}
value: {type: Array},
},
data: function() {
return {
IconClass: "WMi-" + this.Icon,
values: this.value
values: this.value,
rand : Math.random()
};
},
computed: {
valueSelected() {
if (this.itemValue) {
return this.item[this.itemValue];
}
return this.item;
},
showText() {
if (this.itemText) {
return this.item[this.itemText];
}
return this.text;
},
},
methods:{
changeValue($event) {
if (this.value) {
if ($event.target.checked) {
this.value.push(this.ItemID);
this.value.push(this.valueSelected);
} else {
let index = this.value.findIndex(x => x == this.ItemID);
let index = this.value.findIndex(x => x == this.valueSelected);
this.value.splice(index, 1);
}
}
this.$emit('change', this.ItemID, $event.target.checked);
}
},
watch:{

@ -234,6 +234,10 @@ a:hover {
border-radius: 5px;
}
.PreFormatted {
white-space: pre;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,

@ -10,7 +10,7 @@ const createFilterObject = filters => {
}
}
}
return filterObject;
return {filter: filterObject};
};
window['between'] = function (filter) {
var value = null;

@ -18,7 +18,7 @@
></wm-tile>
</a>
</v-layout>
<router-link v-if="getAuthUser.is_owner == 'true'" :to="{name: 'AddModule'}">
<router-link v-if="getAuthUser.is_owner == 'true' || hostname == originHostName" :to="{name: 'AddModule'}">
<v-btn large fab color="cyan" fixed bottom left dark style="left:5%">
<v-icon dark>fas fa-plus</v-icon>
</v-btn>
@ -31,8 +31,12 @@
<script>
import Tile from "@Global/components/Tiles/Tile";
import { mapGetters, mapActions } from "vuex";
import routes from '@Global/utils/common/routes';
export default {
data: () => ({}),
data: () => ({
hostname : window.location.hostname,
originHostName : routes.originHostName()
}),
components: {
"wm-tile": Tile,
},
@ -45,6 +49,7 @@ export default {
},
created() {
this.loadModules({ home_page: true });
}
};
</script>

Loading…
Cancel
Save