crator and messageResponse

This commit is contained in:
saeid
2019-04-24 21:20:12 +04:30
parent df660dd7d4
commit fc162db99b
29 changed files with 460 additions and 817 deletions
Vendored
+136 -35
View File
@@ -268,6 +268,29 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
@@ -276,6 +299,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
name: "",
unique_code: "",
info: [{
id: 0,
name: "",
type: "",
size: ""
@@ -283,22 +307,49 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
},
type: [{
state: "Text",
abbr: "text"
abbr: "Text"
}, {
state: "Checkbox",
abbr: "checkbox"
abbr: "Checkbox"
}, {
state: "Select",
abbr: "select"
abbr: "Select"
}, {
state: "Form",
abbr: "form"
}]
abbr: "Form"
}],
size: [{
state: "not Selected",
abbr: ""
}, {
state: "2 as 12",
abbr: "col-md-2"
}, {
state: "3 as 12",
abbr: "col-md-3"
}, {
state: "4 as 12",
abbr: "col-md-4"
}, {
state: "6 as 12",
abbr: "col-md-6"
}, {
state: "8 as 12",
abbr: "col-md-8"
}, {
state: "10 as 12",
abbr: "col-md-10"
}],
rules: {
required: function required(value) {
return !!value || "Required.";
}
}
};
},
methods: {
changeType: function changeType(infoIndex, selectedboxType) {
if (selectedboxType == "select" || selectedboxType == "checkbox") {
if (selectedboxType == "Select" || selectedboxType == "Checkbox") {
this.form.info[infoIndex]["options"] = [{
title: ""
}];
@@ -306,8 +357,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
this.form.info[infoIndex]["options"] = [];
}
if (selectedboxType == "form") {
if (selectedboxType == "Form") {
this.form.info[infoIndex]["children"] = [{
id: 0,
name: "",
type: "",
size: ""
@@ -330,13 +382,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
},
addInput: function addInput() {
this.form.info.push({
id: 0,
name: "",
type: "",
size: ""
});
},
changeTypeForm: function changeTypeForm(infoIndex, type, formLevel) {
if (type == "select" || type == "checkbox") {
if (type == "Select" || type == "Checkbox") {
var form = this.form;
this.form = "";
form.info[infoIndex]["children"][formLevel]["options"] = [{
@@ -368,6 +421,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
var form = this.form;
this.form = [];
form.info[infoIndex]["children"].push({
id: 0,
name: "",
type: "",
size: ""
@@ -380,6 +434,12 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
form.info[infoIndex]["children"].splice(formLevel, 1);
this.form = form;
},
removeInput: function removeInput(infoIndex) {
var form = this.form;
this.form = [];
form.info.splice(infoIndex, 1);
this.form = form;
},
registerForm: function () {
var _registerForm = _asyncToGenerator(
/*#__PURE__*/
@@ -401,7 +461,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
result = _context.sent;
if (result && result.status == 200) {
this.$router.push("/dashboard");
this.$router.push({
name: "Dashboard"
});
}
case 5:
@@ -432,7 +494,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n.WM-Border-Gray[data-v-d05735bc] {\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-d05735bc] {\n background-color: #f5f5f5;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-d05735bc] {\n top: -25px !important;\n}\n.v-btn--bottom.v-btn--absolute.v-btn--small[data-v-d05735bc] {\n bottom: -24px !important;\n}\n", ""]);
exports.push([module.i, "\n.WM-Border-Gray[data-v-d05735bc] {\r\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-d05735bc] {\r\n background-color: #f5f5f5;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-d05735bc] {\r\n top: -25px !important;\n}\n.v-btn--bottom.v-btn--absolute.v-btn--small[data-v-d05735bc] {\r\n bottom: -24px !important;\n}\r\n", ""]);
@@ -497,10 +559,7 @@ var render = function() {
[
_c(
"v-layout",
{
staticClass: "ma-2",
attrs: { row: "", wrap: "", id: "Form" }
},
{ staticClass: "ma-2", attrs: { row: "", wrap: "" } },
[
_c(
"v-flex",
@@ -508,7 +567,12 @@ var render = function() {
[
_c("v-text-field", {
staticClass: "pa-2",
attrs: { name: "name", label: "Name", color: "black" },
attrs: {
name: "name",
label: "Name",
color: "black",
rules: [_vm.rules.required]
},
model: {
value: _vm.form.name,
callback: function($$v) {
@@ -528,6 +592,7 @@ var render = function() {
_c("v-text-field", {
staticClass: "pa-2",
attrs: {
rules: [_vm.rules.required],
name: "uniquecode",
label: "Unique Code",
color: "black"
@@ -559,10 +624,7 @@ var render = function() {
[
_c(
"v-layout",
{
staticClass: "ma-2",
attrs: { row: "", wrap: "", id: "Form" }
},
{ staticClass: "ma-2", attrs: { row: "", wrap: "" } },
[
_c(
"v-flex",
@@ -573,7 +635,8 @@ var render = function() {
attrs: {
name: "inputname",
label: "Input Name",
color: "black"
color: "black",
rules: [_vm.rules.required]
},
model: {
value: info.name,
@@ -622,11 +685,14 @@ var render = function() {
"v-flex",
{ attrs: { xs12: "", md3: "", sm3: "" } },
[
_c("v-text-field", {
_c("v-select", {
staticClass: "pa-2",
attrs: {
name: "size",
label: "Size",
items: _vm.size,
"item-text": "state",
"item-value": "abbr",
label: "Type",
"single-line": "",
color: "black"
},
model: {
@@ -644,7 +710,7 @@ var render = function() {
1
),
_vm._v(" "),
info.type === "select" || info.type === "checkbox"
info.type === "Select" || info.type === "Checkbox"
? _c(
"v-layout",
{
@@ -676,6 +742,7 @@ var render = function() {
_c("v-text-field", {
staticClass: "pa-2 Input",
attrs: {
rules: [_vm.rules.required],
name: "title",
label: "Title",
color: "black"
@@ -766,7 +833,7 @@ var render = function() {
)
: _vm._e(),
_vm._v(" "),
info.type === "form"
info.type === "Form"
? _c(
"v-layout",
{
@@ -795,6 +862,7 @@ var render = function() {
_c("v-text-field", {
staticClass: "pa-2",
attrs: {
rules: [_vm.rules.required],
name: "name",
label: "Input Name",
color: "black"
@@ -850,11 +918,14 @@ var render = function() {
"v-flex",
{ attrs: { xs12: "", md3: "", sm3: "" } },
[
_c("v-text-field", {
_c("v-select", {
staticClass: "pa-2",
attrs: {
name: "size",
label: "Size",
items: _vm.size,
"item-text": "state",
"item-value": "abbr",
label: "Type",
"single-line": "",
color: "black"
},
model: {
@@ -869,8 +940,8 @@ var render = function() {
1
),
_vm._v(" "),
children.type === "select" ||
children.type === "checkbox"
children.type === "Select" ||
children.type === "Checkbox"
? _c(
"v-layout",
{
@@ -912,7 +983,10 @@ var render = function() {
attrs: {
name: "title",
label: "Title",
color: "black"
color: "black",
rules: [
_vm.rules.required
]
},
model: {
value:
@@ -1033,8 +1107,7 @@ var render = function() {
small: "",
right: "",
top: "",
color: "pink",
id: "RemoveFormDuplicator"
color: "pink"
},
on: {
click: function($event) {
@@ -1071,8 +1144,7 @@ var render = function() {
small: "",
right: "",
bottom: "",
color: "cyan",
id: "FormDuplicator"
color: "cyan"
},
on: {
click: function($event) {
@@ -1095,6 +1167,35 @@ var render = function() {
)
: _vm._e(),
_vm._v(" "),
keyForm > 0
? _c(
"v-btn",
{
attrs: {
absolute: "",
small: "",
right: "",
top: "",
color: "pink"
},
on: {
click: function($event) {
return _vm.removeInput(keyForm)
}
}
},
[
_c(
"v-icon",
{ staticClass: "white--text mr-2 caption" },
[_vm._v("fas fa-times")]
),
_vm._v("REMOVE\n ")
],
1
)
: _vm._e(),
_vm._v(" "),
_vm.form.info.length - 1 == keyForm
? _c(
"v-layout",