This commit is contained in:
saeid
2019-04-22 21:47:43 +04:30
parent 3d4db20770
commit e8196ceb39
10 changed files with 440 additions and 363 deletions
@@ -24,7 +24,7 @@ class CreateUsersTable extends Migration
$table->unsignedBigInteger('medical_center_id');
$table->foreign('medical_center_id')->references('id')->on('medical_centers');
$table->string('password');
$table->text('address')->nullable();
$table->string('address')->nullable();
$table->rememberToken();
$table->timestamps();
});
Vendored
+1 -1
View File
@@ -166,7 +166,7 @@ var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
if (isUndefined(debugEnviron))
debugEnviron = Object({"MIX_PUSHER_APP_KEY":"","MIX_PUSHER_APP_CLUSTER":"mt1","MIX_APP_ROOT_API":"/api/","MIX_APP_CLIENT_ID":"2","MIX_APP_CLIENT_SECRET":"I1VA4V6AVGjNb5LAYHMqFcMIvj4FF957uIpBKZu3","NODE_ENV":"development"}).NODE_DEBUG || '';
debugEnviron = Object({"MIX_APP_CLIENT_ID":"2","MIX_APP_CLIENT_SECRET":"vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE","MIX_APP_ROOT_API":"/api/","MIX_PUSHER_APP_CLUSTER":"mt1","MIX_PUSHER_APP_KEY":"","NODE_ENV":"development"}).NODE_DEBUG || '';
set = set.toUpperCase();
if (!debugs[set]) {
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
Vendored
+1 -1
View File
@@ -210,7 +210,7 @@ __webpack_require__.r(__webpack_exports__);
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[data-v-308d838e] {\n border: 1px solid;\n}\n.WM-Border-Black[data-v-308d838e] {\n border-color: #2f353b !important;\n}\n.WM-Border-Gray[data-v-308d838e] {\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-308d838e] {\n background-color : #F5F5F5;\n}\n.WM-Relative[data-v-308d838e] {\n position: relative;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-308d838e] {\n top: -25px !important;\n}\n", ""]);
exports.push([module.i, "\n.WM-Border[data-v-308d838e] {\r\n border: 1px solid;\n}\n.WM-Border-Black[data-v-308d838e] {\r\n border-color: #2f353b !important;\n}\n.WM-Border-Gray[data-v-308d838e] {\r\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-308d838e] {\r\n background-color : #F5F5F5;\n}\n.WM-Relative[data-v-308d838e] {\r\n position: relative;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-308d838e] {\r\n top: -25px !important;\n}\r\n", ""]);
+1 -1
View File
@@ -48,7 +48,7 @@ __webpack_require__.r(__webpack_exports__);
name: "",
data: function data() {
return {
items: ['SuperAdmin', 'Admin', 'SuperVisior', 'User']
items: ['SuperAdmin', 'Admin', 'Supervisor', 'User']
};
}
});
Vendored
+1 -1
View File
@@ -217,7 +217,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-ActionButton[data-v-1305c16e] {\n padding: 8px 22px;\n}\n", ""]);
exports.push([module.i, "\n.WM-ActionButton[data-v-1305c16e] {\r\n padding: 8px 22px;\n}\r\n", ""]);
Vendored
+71 -13
View File
@@ -281,10 +281,29 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: "",
data: function data() {
return {
form: {},
SelectedType: {
0: 0,
1: {}
@@ -423,7 +442,7 @@ __webpack_require__.r(__webpack_exports__);
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", ""]);
@@ -486,6 +505,44 @@ var render = function() {
"material-card",
{ attrs: { color: "black", title: "Add a New Test" } },
[
_c(
"v-layout",
{
staticClass: "ma-2",
attrs: { row: "", wrap: "", id: "Form" }
},
[
_c(
"v-flex",
{ attrs: { xs12: "", md3: "", sm3: "" } },
[
_c("v-text-field", {
staticClass: "pa-2",
attrs: { name: "name", label: "Name", color: "black" }
})
],
1
),
_vm._v(" "),
_c(
"v-flex",
{ attrs: { xs12: "", md3: "", sm3: "" } },
[
_c("v-text-field", {
staticClass: "pa-2",
attrs: {
name: "uniquecode",
label: "Unique Code",
color: "black"
}
})
],
1
)
],
1
),
_vm._v(" "),
_c(
"v-layout",
{
@@ -508,10 +565,9 @@ var render = function() {
_c("v-text-field", {
staticClass: "pa-2",
attrs: {
name: "name",
label: "Name",
color: "black",
id: "name"
name: "inputname",
label: "Input Name",
color: "black"
}
})
],
@@ -645,7 +701,9 @@ var render = function() {
},
[_vm._v("fas fa-times")]
),
_vm._v("\n REMOVE")
_vm._v(
"\n REMOVE"
)
],
1
)
@@ -844,9 +902,9 @@ var render = function() {
_c("v-text-field", {
staticClass: "pa-2",
attrs: {
name: "name",
label: "Name",
id: ""
name: "inputname",
label: "Input Name",
color: "black"
}
})
],
@@ -1002,7 +1060,7 @@ var render = function() {
]
),
_vm._v(
"\n REMOVE"
"\n REMOVE"
)
],
1
@@ -1153,7 +1211,7 @@ var render = function() {
]
),
_vm._v(
"\n REMOVE"
"\n REMOVE"
)
],
1
@@ -1235,7 +1293,7 @@ var render = function() {
},
[_vm._v("fas fa-times")]
),
_vm._v("\n REMOVE")
_vm._v("\n REMOVE")
],
1
)
@@ -1263,7 +1321,7 @@ var render = function() {
{ staticClass: "white--text mr-2 caption" },
[_vm._v("fas fa-plus")]
),
_vm._v("\n ADD")
_vm._v("\nADD")
],
1
)
+1 -1
View File
@@ -1,3 +1,3 @@
{
"/vue/js/app.js": "/vue/js/app.js?id=ab1390f42a1283f0db66"
"/vue/js/app.js": "/vue/js/app.js?id=83db251ea150b123e82c"
}
+6 -6
View File
@@ -8247,7 +8247,7 @@ exports.push([module.i, "/*!\n* Vuetify v1.5.11\n* Forged by John Leider\n* Rele
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#core-footer {\n z-index: 0;\n}\n", ""]);
exports.push([module.i, "\n#core-footer {\r\n z-index: 0;\n}\r\n", ""]);
@@ -62549,7 +62549,7 @@ var UserService = {
},
auth: {
username: "2",
password: "I1VA4V6AVGjNb5LAYHMqFcMIvj4FF957uIpBKZu3"
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
}
};
_context.prev = 1;
@@ -62609,7 +62609,7 @@ var UserService = {
},
auth: {
username: "2",
password: "I1VA4V6AVGjNb5LAYHMqFcMIvj4FF957uIpBKZu3"
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
}
};
_context2.prev = 1;
@@ -62664,7 +62664,7 @@ var UserService = {
},
auth: {
username: "2",
password: "I1VA4V6AVGjNb5LAYHMqFcMIvj4FF957uIpBKZu3"
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
}
};
_context3.prev = 1;
@@ -62718,7 +62718,7 @@ var UserService = {
},
auth: {
username: "2",
password: "I1VA4V6AVGjNb5LAYHMqFcMIvj4FF957uIpBKZu3"
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
}
};
_context4.prev = 2;
@@ -63891,7 +63891,7 @@ module.exports = webpackAsyncContext;
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! /home/saeid/Projects/Git/CSSD/resources/js/vue/main.js */"./resources/js/vue/main.js");
module.exports = __webpack_require__(/*! D:\Atom\Git\Laravel_CSSD\resources\js\vue\main.js */"./resources/js/vue/main.js");
/***/ })
+1 -1
View File
@@ -40,7 +40,7 @@ export default {
items : [
'SuperAdmin',
'Admin',
'SuperVisior',
'Supervisor',
'User'
]
})
+356 -337
View File
@@ -1,129 +1,147 @@
<template>
<v-form id="ParentForm">
<v-container grid-list-xs>
<material-card
color="black"
title="Add a New Test"
class="">
<v-layout row wrap class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Relative">
<v-layout row wrap id="Form" class="ma-2">
<v-flex xs12 md3 sm3>
<v-text-field
name="name"
label="Name"
color="black"
class="pa-2"
id="name"
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="Items[0]"
item-text="state"
item-value="abbr"
label="Type"
v-model="SelectedType[0]"
single-line
color="black"
class="pa-2"
@change="DefaultValue(0, SelectedType[0])"
></v-select>
</v-flex>
<!-- Text Input Section -->
<v-flex xs12 md3 sm3 v-if="SelectedType[0] === 'text'">
<v-text-field
name="size"
label="Size"
color="black"
class="pa-2"
id="InputSize"
></v-text-field>
</v-flex>
</v-layout>
<!-- SelectBox Section -->
<v-layout class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" row wrap v-if="SelectedType[0] === 'select'">
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3 v-for="(SelectBox , Key) in ArraySelectBox[0]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="SelectBox.value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
v-if="Key >= 1"
@click="RemoveInput('ArraySelectBox', 0, Key)"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
<v-form id="ParentForm">
<v-container grid-list-xs>
<material-card
color="black"
title="Add a New Test"
class="">
<v-layout row wrap id="Form" class="ma-2">
<v-flex xs12 md3 sm3>
<v-text-field
name="name"
label="Name"
color="black"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3>
<v-text-field
name="uniquecode"
label="Unique Code"
color="black"
class="pa-2"
></v-text-field>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArraySelectBox', 0)"
color="black"
class="mb-2">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<!-- Checkbox Section -->
<v-layout row wrap class="pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[0] === 'checkbox'">
<v-layout row wrap class="WM-Width-Full WM-Relative">
<v-flex xs12 sm3 md3 v-for="(Checkbox , Key) in ArrayCheckBox[0]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="Checkbox.value"
></v-text-field>
<v-btn
absolute
small
right
bottom
@click="RemoveInput('ArrayCheckBox', 0, Key)"
v-if="Key >= 1"
color="pink">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span class="white--text">REMOVE</span>
<v-layout row wrap class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Relative">
<v-layout row wrap id="Form" class="ma-2">
<v-flex xs12 md3 sm3>
<v-text-field
name="inputname"
label="Input Name"
color="black"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="Items[0]"
item-text="state"
item-value="abbr"
label="Type"
v-model="SelectedType[0]"
single-line
color="black"
class="pa-2"
@change="DefaultValue(0, SelectedType[0])"
></v-select>
</v-flex>
<!-- Text Input Section -->
<v-flex xs12 md3 sm3 v-if="SelectedType[0] === 'text'">
<v-text-field
name="size"
label="Size"
color="black"
class="pa-2"
id="InputSize"
></v-text-field>
</v-flex>
</v-layout>
<!-- SelectBox Section -->
<v-layout class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" row wrap v-if="SelectedType[0] === 'select'">
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3 v-for="(SelectBox , Key) in ArraySelectBox[0]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="SelectBox.value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
v-if="Key >= 1"
@click="RemoveInput('ArraySelectBox', 0, Key)"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArraySelectBox', 0)"
color="black"
class="mb-2">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-flex>
</v-layout>
<!-- Checkbox Section -->
<v-layout row wrap class="pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[0] === 'checkbox'">
<v-layout row wrap class="WM-Width-Full WM-Relative">
<v-flex xs12 sm3 md3 v-for="(Checkbox , Key) in ArrayCheckBox[0]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="Checkbox.value"
></v-text-field>
<v-btn
absolute
small
right
bottom
@click="RemoveInput('ArrayCheckBox', 0, Key)"
v-if="Key >= 1"
color="pink">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span class="white--text">REMOVE</span>
</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
small
right
bottom
@click="InputDuplicate('ArrayCheckBox', 0)"
class="mb-2"
color="black">
absolute
small
right
bottom
@click="InputDuplicate('ArrayCheckBox', 0)"
class="mb-2"
color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<!-- Form Section -->
<v-layout row wrap v-if="SelectedType[0] === 'form'" class="pa-3 my-4 mx-3 WM-Border WM-Border-Black WM-Relative">
<v-layout row wrap v-for="(Div , ArrayDivKey) in ArrayDiv" :key="ArrayDivKey" class="pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Color-LightGrey WM-Width-Full WM-Relative Form">
<v-flex xs12 md3 sm3>
</v-btn>
</v-layout>
<!-- Form Section -->
<v-layout row wrap v-if="SelectedType[0] === 'form'" class="pa-3 my-4 mx-3 WM-Border WM-Border-Black WM-Relative">
<v-layout row wrap v-for="(Div , ArrayDivKey) in ArrayDiv" :key="ArrayDivKey" class="pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Color-LightGrey WM-Width-Full WM-Relative Form">
<v-flex xs12 md3 sm3>
<v-text-field
class="pa-2"
name="name"
label="Name"
id=""
name="inputname"
label="Input Name"
color="black"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="Items[1]"
item-text="state"
@@ -135,253 +153,254 @@
class="pa-2"
@change="DefaultValue(ArrayDivKey, SelectedType[1][ArrayDivKey])"
></v-select>
</v-flex>
<v-flex xs12 md3 sm3 v-if="SelectedType[1][ArrayDivKey] === 'text'">
</v-flex>
<v-flex xs12 md3 sm3 v-if="SelectedType[1][ArrayDivKey] === 'text'">
<v-text-field
name="size"
label="Size"
color="black"
class="pa-2"
id="InputSize"
name="size"
label="Size"
color="black"
class="pa-2"
id="InputSize"
></v-text-field>
</v-flex>
<!-- Inner Form Selectbox Section -->
<v-layout row wrap class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[1][ArrayDivKey] === 'select'" >
</v-flex>
<!-- Inner Form Selectbox Section -->
<v-layout row wrap class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[1][ArrayDivKey] === 'select'" >
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3 v-for="(SelectBox , Key) in ArraySelectBox[ArrayDivKey]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="SelectBox.value"
id="value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
@click="RemoveInput('ArraySelectBox', ArrayDivKey, Key)"
v-if="Key >= 1"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
<v-flex xs12 md3 sm3 v-for="(SelectBox , Key) in ArraySelectBox[ArrayDivKey]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="SelectBox.value"
id="value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
@click="RemoveInput('ArraySelectBox', ArrayDivKey, Key)"
v-if="Key >= 1"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArraySelectBox', ArrayDivKey)"
color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<!-- Inner Form Checkbox Section -->
<v-layout row wrap class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[1][ArrayDivKey] === 'checkbox'" >
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3 v-if="Key >= 0" v-for="(CheckBox , Key) in ArrayCheckBox[ArrayDivKey]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="CheckBox.value"
id="value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
@click="RemoveInput('ArrayCheckBox', ArrayDivKey, Key)"
v-if="Key >= 1"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArrayCheckBox', ArrayDivKey)"
color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<v-btn
absolute
small
right
top
color="pink"
@click="Remove(ArrayDivKey)"
id="RemoveFormDuplicator"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
bottom
small
@click="InputDuplicate('ArraySelectBox', ArrayDivKey)"
color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<!-- Inner Form Checkbox Section -->
<v-layout row wrap class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" v-if="SelectedType[1][ArrayDivKey] === 'checkbox'" >
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3 v-if="Key >= 0" v-for="(CheckBox , Key) in ArrayCheckBox[ArrayDivKey]" :key="Key" class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="CheckBox.value"
id="value"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
@click="RemoveInput('ArrayCheckBox', ArrayDivKey, Key)"
v-if="Key >= 1"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
small
right
bottom
color="cyan"
@click="Duplicator"
id="FormDuplicator"
>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
ADD</v-btn>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArrayForm', 0)"
color="pink"
class="mb-2">
@click="InputDuplicate('ArrayCheckBox', ArrayDivKey)"
color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<v-layout row wrap align-center justify-center class="mt-4">
<v-btn class="WM-CyanBlueGradient-BG" v-if="Hidden" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">Generate Form</span>
</v-btn>
<router-link to="/dashboard">
<v-btn
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
</v-btn>
</router-link>
</v-layout>
</material-card>
</v-container>
</v-form>
</v-btn>
</v-layout>
<v-btn
absolute
small
right
top
color="pink"
@click="Remove(ArrayDivKey)"
id="RemoveFormDuplicator"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE</v-btn>
</v-layout>
<v-btn
absolute
small
right
bottom
color="cyan"
@click="Duplicator"
id="FormDuplicator"
>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
ADD</v-btn>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="InputDuplicate('ArrayForm', 0)"
color="pink"
class="mb-2">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<v-layout row wrap align-center justify-center class="mt-4">
<v-btn class="WM-CyanBlueGradient-BG" v-if="Hidden" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">Generate Form</span>
</v-btn>
<router-link to="/dashboard">
<v-btn
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
</v-btn>
</router-link>
</v-layout>
</material-card>
</v-container>
</v-form>
</template>
<script>
export default {
name: "",
data () {
return {
SelectedType : {0 : 0, 1 : {}},
InputDuplicator : {0:0},
ArrayInput : [{value:''}],
ArraySelectBox : [],
ArrayCheckBox : [],
ArrayForm : [],
SelectBox : {},
CheckBox : {},
ArrayDiv : [0],
Hidden : false,
select: { state: 'Text', abbr: 'text' },
Items: [
[
{ state: 'Text', abbr: 'text' },
{ state: 'Checkbox', abbr: 'checkbox' },
{ state: 'Select', abbr: 'select' },
{ state: 'Form', abbr: 'form' },
],
[
{ state: 'Text', abbr: 'text' },
{ state: 'Checkbox', abbr: 'checkbox' },
{ state: 'Select', abbr: 'select' },
]
],
}
},
methods: {
Duplicator() {
this.ArrayDiv.push(this.ArrayDiv.length);
name: "",
data () {
return {
form : {},
SelectedType : {0 : 0, 1 : {}},
InputDuplicator : {0:0},
ArrayInput : [{value:''}],
ArraySelectBox : [],
ArrayCheckBox : [],
ArrayForm : [],
SelectBox : {},
CheckBox : {},
ArrayDiv : [0],
Hidden : false,
select: { state: 'Text', abbr: 'text' },
Items: [
[
{ state: 'Text', abbr: 'text' },
{ state: 'Checkbox', abbr: 'checkbox' },
{ state: 'Select', abbr: 'select' },
{ state: 'Form', abbr: 'form' },
],
[
{ state: 'Text', abbr: 'text' },
{ state: 'Checkbox', abbr: 'checkbox' },
{ state: 'Select', abbr: 'select' },
]
],
}
},
Remove (index) {
this.ArrayDiv.splice(index, 1);
},
RemoveInput (Type, ArrayDivindex, index) {
if (Type === 'ArraySelectBox') {
this.ArraySelectBox[ArrayDivindex].splice(index, 1);
this.CreateAgainArray(this.ArraySelectBox, 'ArraySelectBox');
}
else {
this.ArrayCheckBox[ArrayDivindex].splice(index, 1);
this.CreateAgainArray(this.ArrayCheckBox, 'ArrayCheckBox');
}
},
InputDuplicate (Type, ArrayDivindex) {
if (Type === 'ArraySelectBox') {
if (this.ArraySelectBox[ArrayDivindex] == undefined) {
this.ArraySelectBox[ArrayDivindex] = [];
methods: {
Duplicator() {
this.ArrayDiv.push(this.ArrayDiv.length);
},
Remove (index) {
this.ArrayDiv.splice(index, 1);
},
RemoveInput (Type, ArrayDivindex, index) {
if (Type === 'ArraySelectBox') {
this.ArraySelectBox[ArrayDivindex].splice(index, 1);
this.CreateAgainArray(this.ArraySelectBox, 'ArraySelectBox');
}
else {
this.ArrayCheckBox[ArrayDivindex].splice(index, 1);
this.CreateAgainArray(this.ArrayCheckBox, 'ArrayCheckBox');
}
},
InputDuplicate (Type, ArrayDivindex) {
if (Type === 'ArraySelectBox') {
if (this.ArraySelectBox[ArrayDivindex] == undefined) {
this.ArraySelectBox[ArrayDivindex] = [];
}
this.ArraySelectBox[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArraySelectBox, 'ArraySelectBox');
}
else if(Type === 'ArrayCheckBox'){
if (this.ArrayCheckBox[ArrayDivindex] == undefined) {
this.ArrayCheckBox[ArrayDivindex] = [];
}
this.ArrayCheckBox[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArrayCheckBox, 'ArrayCheckBox');
}
else {
if (this.ArrayForm[ArrayDivindex] == undefined) {
this.ArrayForm[ArrayDivindex] = [];
}
else {
this.ArrayForm[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArrayForm, 'ArrayForm');
}
}
},
CreateAgainArray(arrayDiv, Type) {
let array = arrayDiv;
if (Type === 'ArraySelectBox') {
this.ArraySelectBox = [];
this.ArraySelectBox = array;
}
else if(Type === 'ArrayCheckBox'){
this.ArrayCheckBox = [];
this.ArrayCheckBox = array;
}
else {
this.ArrayForm = [];
this.ArrayForm = array;
}
},
DefaultValue(ArrayDivindex, SelectedType) {
this.Hidden = true;
if (SelectedType == 'select') {
if (this.ArraySelectBox[ArrayDivindex] == undefined) {
this.ArraySelectBox[ArrayDivindex] = [];
this.ArraySelectBox[ArrayDivindex].push({value : ''});
}
} else if(SelectedType == 'checkbox') {
if (this.ArrayCheckBox[ArrayDivindex] == undefined) {
this.ArrayCheckBox[ArrayDivindex] = [];
this.ArrayCheckBox[ArrayDivindex].push({value : ''});
}
}
}
this.ArraySelectBox[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArraySelectBox, 'ArraySelectBox');
}
else if(Type === 'ArrayCheckBox'){
if (this.ArrayCheckBox[ArrayDivindex] == undefined) {
this.ArrayCheckBox[ArrayDivindex] = [];
}
this.ArrayCheckBox[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArrayCheckBox, 'ArrayCheckBox');
}
else {
if (this.ArrayForm[ArrayDivindex] == undefined) {
this.ArrayForm[ArrayDivindex] = [];
}
else {
this.ArrayForm[ArrayDivindex].push({value : ''});
this.CreateAgainArray(this.ArrayForm, 'ArrayForm');
}
}
},
CreateAgainArray(arrayDiv, Type) {
let array = arrayDiv;
if (Type === 'ArraySelectBox') {
this.ArraySelectBox = [];
this.ArraySelectBox = array;
}
else if(Type === 'ArrayCheckBox'){
this.ArrayCheckBox = [];
this.ArrayCheckBox = array;
}
else {
this.ArrayForm = [];
this.ArrayForm = array;
}
},
DefaultValue(ArrayDivindex, SelectedType) {
this.Hidden = true;
if (SelectedType == 'select') {
if (this.ArraySelectBox[ArrayDivindex] == undefined) {
this.ArraySelectBox[ArrayDivindex] = [];
this.ArraySelectBox[ArrayDivindex].push({value : ''});
}
} else if(SelectedType == 'checkbox') {
if (this.ArrayCheckBox[ArrayDivindex] == undefined) {
this.ArrayCheckBox[ArrayDivindex] = [];
this.ArrayCheckBox[ArrayDivindex].push({value : ''});
}
}
}
}
}
}
</script>
<style lang="css" scoped>
.WM-Border-Gray {
border-color: #aaa !important;
border-color: #aaa !important;
}
.WM-Color-LightGrey {
background-color : #F5F5F5;
background-color : #F5F5F5;
}
.v-btn--top.v-btn--absolute.v-btn--small {
top: -25px !important;