Skip to content

Instantly share code, notes, and snippets.

@GiacomoP GiacomoP/app.js
Last active Sep 2, 2019

Embed
What would you like to do?
M5S Rousseau - Admin Frontend app
(function(e) {
function t(t) {
for (var n, s, r = t[0], l = t[1], d = t[2], c = 0, m = []; c < r.length; c++) s = r[c], a[s] && m.push(a[s][0]), a[s] = 0;
for (n in l) Object.prototype.hasOwnProperty.call(l, n) && (e[n] = l[n]);
u && u(t);
while (m.length) m.shift()();
return o.push.apply(o, d || []), i()
}
function i() {
for (var e, t = 0; t < o.length; t++) {
for (var i = o[t], n = !0, s = 1; s < i.length; s++) {
var l = i[s];
0 !== a[l] && (n = !1)
}
n && (o.splice(t--, 1), e = r(r.s = i[0]))
}
return e
}
var n = {},
a = {
app: 0
},
o = [];
function s(e) {
return r.p + "js/" + ({
pdfjsWorker: "pdfjsWorker"
} [e] || e) + "." + {
pdfjsWorker: "ad4dcdd9"
} [e] + ".js"
}
function r(t) {
if (n[t]) return n[t].exports;
var i = n[t] = {
i: t,
l: !1,
exports: {}
};
return e[t].call(i.exports, i, i.exports, r), i.l = !0, i.exports
}
r.e = function(e) {
var t = [],
i = a[e];
if (0 !== i)
if (i) t.push(i[2]);
else {
var n = new Promise(function(t, n) {
i = a[e] = [t, n]
});
t.push(i[2] = n);
var o, l = document.createElement("script");
l.charset = "utf-8", l.timeout = 120, r.nc && l.setAttribute("nonce", r.nc), l.src = s(e), o = function(t) {
l.onerror = l.onload = null, clearTimeout(d);
var i = a[e];
if (0 !== i) {
if (i) {
var n = t && ("load" === t.type ? "missing" : t.type),
o = t && t.target && t.target.src,
s = new Error("Loading chunk " + e + " failed.\n(" + n + ": " + o + ")");
s.type = n, s.request = o, i[1](s)
}
a[e] = void 0
}
};
var d = setTimeout(function() {
o({
type: "timeout",
target: l
})
}, 12e4);
l.onerror = l.onload = o, document.head.appendChild(l)
} return Promise.all(t)
}, r.m = e, r.c = n, r.d = function(e, t, i) {
r.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: i
})
}, r.r = function(e) {
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(e, "__esModule", {
value: !0
})
}, r.t = function(e, t) {
if (1 & t && (e = r(e)), 8 & t) return e;
if (4 & t && "object" === typeof e && e && e.__esModule) return e;
var i = Object.create(null);
if (r.r(i), Object.defineProperty(i, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var n in e) r.d(i, n, function(t) {
return e[t]
}.bind(null, n));
return i
}, r.n = function(e) {
var t = e && e.__esModule ? function() {
return e["default"]
} : function() {
return e
};
return r.d(t, "a", t), t
}, r.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, r.p = "/", r.oe = function(e) {
throw console.error(e), e
};
var l = window["webpackJsonp"] = window["webpackJsonp"] || [],
d = l.push.bind(l);
l.push = t, l = l.slice();
for (var c = 0; c < l.length; c++) t(l[c]);
var u = d;
o.push([0, "chunk-vendors"]), i()
})({
0: function(e, t, i) {
e.exports = i("56d7")
},
"0054": function(e, t, i) {
e.exports = i.p + "img/5s-logo.643fbc04.png"
},
"0275": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "mutation",
name: {
kind: "Name",
value: "EditPoll"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "attributes"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "UpdatePollInput"
}
}
},
directives: []
}, {
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "polls"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "pollUpdate"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "id"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
}
}, {
kind: "Argument",
name: {
kind: "Name",
value: "attributes"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "attributes"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "errors"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "details"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "base"
},
arguments: [],
directives: []
}]
}
}, {
kind: "Field",
name: {
kind: "Name",
value: "messages"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "base"
},
arguments: [],
directives: []
}]
}
}]
}
}, {
kind: "Field",
name: {
kind: "Name",
value: "poll"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "id"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "title"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "slug"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "status"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "publicResults"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 464
}
};
i.loc.source = {
body: "mutation EditPoll($attributes: UpdatePollInput!, $id: ID!) {\n polls {\n pollUpdate(id: $id, attributes: $attributes) {\n errors{\n details{\n base\n }\n messages{\n base\n }\n }\n poll {\n id\n title\n slug\n status\n publicResults\n }\n }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["EditPoll"] = s(i, "EditPoll")
},
"0a5e": function(e, t, i) {
"use strict";
var n = i("3114"),
a = i.n(n);
a.a
},
"0be4": function(e, t, i) {
"use strict";
var n = i("8a79"),
a = i.n(n);
a.a
},
"0e5f": function(e, t, i) {},
1: function(e, t) {},
1060: function(e, t, i) {},
"11e1": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "mutation",
name: {
kind: "Name",
value: "identityVerificationRequestApprove"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "requestId"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "certification"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "identityVerificationRequestApprove"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "requestId"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "requestId"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "errors"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 160
}
};
i.loc.source = {
body: "mutation identityVerificationRequestApprove($requestId: ID!) {\n\tcertification {\n\t\tidentityVerificationRequestApprove(requestId: $requestId) {\n\t\t\terrors\n\t\t}\n\t}\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["identityVerificationRequestApprove"] = s(i, "identityVerificationRequestApprove")
},
"127f": function(e, t, i) {},
1584: function(e, t, i) {
"use strict";
var n = i("8ce4"),
a = i.n(n);
a.a
},
"1c8b": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "mutation",
name: {
kind: "Name",
value: "RemovePoll"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "polls"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "pollCancel"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "pollId"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "errors"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 114
}
};
i.loc.source = {
body: "mutation RemovePoll($id: ID!) {\n polls {\n pollCancel(pollId: $id) {\n errors\n }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["RemovePoll"] = s(i, "RemovePoll")
},
"1d95": function(e, t, i) {},
"1f63": function(e, t, i) {},
2: function(e, t) {},
2243: function(e, t, i) {},
2500: function(e, t) {
function i(e) {
var t = new Error("Cannot find module '" + e + "'");
throw t.code = "MODULE_NOT_FOUND", t
}
i.keys = function() {
return []
}, i.resolve = i, e.exports = i, i.id = "2500"
},
"286c": function(e, t, i) {},
"289d": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "mutation",
name: {
kind: "Name",
value: "deleteUser"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "userId"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "users"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "userDelete"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "userId"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "userId"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "errors"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 122
}
};
i.loc.source = {
body: "mutation deleteUser($userId: ID!) {\n users {\n userDelete(userId: $userId) {\n errors\n }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["deleteUser"] = s(i, "deleteUser")
},
"2cc0": function(e, t, i) {
"use strict";
var n = i("1f63"),
a = i.n(n);
a.a
},
"2d5e": function(e, t, i) {},
3: function(e, t) {},
3114: function(e, t, i) {},
"31b2": function(e, t, i) {},
3559: function(e, t, i) {
"use strict";
var n = i("2d5e"),
a = i.n(n);
a.a
},
"37bb": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "query",
name: {
kind: "Name",
value: "getPollResult"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "poll"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "id"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "title"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "status"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "resultSummary"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "submittedAnswerCount"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "totalAnswerCount"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "averageAnswerCount"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "results"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "nodes"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "count"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "option"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "InlineFragment",
typeCondition: {
kind: "NamedType",
name: {
kind: "Name",
value: "TextOption"
}
},
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "text"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}]
}
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 473
}
};
i.loc.source = {
body: "query getPollResult($id: ID!) {\n poll(id: $id) {\n title\n status\n resultSummary {\n submittedAnswerCount\n totalAnswerCount\n averageAnswerCount\n results {\n nodes {\n count\n option {\n ... on TextOption {\n text\n }\n }\n }\n }\n }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["getPollResult"] = s(i, "getPollResult")
},
"391b": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "query",
name: {
kind: "Name",
value: "users"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "search"
}
},
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "String"
}
},
directives: []
}, {
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "after"
}
},
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "String"
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "users"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "search"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "search"
}
}
}, {
kind: "Argument",
name: {
kind: "Name",
value: "after"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "after"
}
}
}, {
kind: "Argument",
name: {
kind: "Name",
value: "first"
},
value: {
kind: "IntValue",
value: "50"
}
}, {
kind: "Argument",
name: {
kind: "Name",
value: "orderAttribute"
},
value: {
kind: "EnumValue",
value: "first_name"
}
}, {
kind: "Argument",
name: {
kind: "Name",
value: "orderDirection"
},
value: {
kind: "EnumValue",
value: "ASC"
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "pageInfo"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "endCursor"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "hasNextPage"
},
arguments: [],
directives: []
}]
}
}, {
kind: "Field",
name: {
kind: "Name",
value: "nodes"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "firstName"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "lastName"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "phoneNumber"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "email"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "codiceFiscale"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "createdAt"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "slug"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 379
}
};
i.loc.source = {
body: "query users($search: String, $after: String) {\n users(search: $search, after: $after, first: 50, orderAttribute: first_name, orderDirection: ASC) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n firstName\n lastName\n phoneNumber\n email\n codiceFiscale\n createdAt\n slug\n }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["users"] = s(i, "users")
},
4: function(e, t) {},
"414a": function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", function() {
return utils
});
const utils = {
methods: {
checkNull(path, placeholder) {
for (var pathElements = path.split("."), field, i = 0; i <= pathElements.length; i++) {
for (var pathCompletion = "", j = i; j >= 0; j--) void 0 !== pathElements[j] && (pathCompletion = pathElements[j] + "." + pathCompletion);
if (pathCompletion = pathCompletion.substring(0, pathCompletion.length - 1), field = eval(pathCompletion), !field) return placeholder
}
return field
}
}
}
},
"42f3": function(e, t) {
var i = {
kind: "Document",
definitions: [{
kind: "OperationDefinition",
operation: "mutation",
name: {
kind: "Name",
value: "optionDelete"
},
variableDefinitions: [{
kind: "VariableDefinition",
variable: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
},
type: {
kind: "NonNullType",
type: {
kind: "NamedType",
name: {
kind: "Name",
value: "ID"
}
}
},
directives: []
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "polls"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "optionGroups"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "options"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "optionDelete"
},
arguments: [{
kind: "Argument",
name: {
kind: "Name",
value: "optionId"
},
value: {
kind: "Variable",
name: {
kind: "Name",
value: "id"
}
}
}],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "errors"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "option"
},
arguments: [],
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "id"
},
arguments: [],
directives: []
}, {
kind: "Field",
name: {
kind: "Name",
value: "__typename"
},
arguments: [],
directives: []
}, {
kind: "InlineFragment",
typeCondition: {
kind: "NamedType",
name: {
kind: "Name",
value: "TextOption"
}
},
directives: [],
selectionSet: {
kind: "SelectionSet",
selections: [{
kind: "Field",
name: {
kind: "Name",
value: "text"
},
arguments: [],
directives: []
}]
}
}]
}
}]
}
}]
}
}]
}
}]
}
}]
}
}],
loc: {
start: 0,
end: 408
}
};
i.loc.source = {
body: "mutation optionDelete($id: ID!) {\n polls {\n optionGroups {\n\t\t options {\n\t optionDelete(optionId: $id) {\n\t errors\n option {\n id\n __typename\n ... on TextOption {\n text\n }\n }\n\t }\n\t }\n\t }\n }\n}",
name: "GraphQL request",
locationOffset: {
line: 1,
column: 1
}
};
function n(e, t) {
if ("FragmentSpread" === e.kind) t.add(e.name.value);
else if ("VariableDefinition" === e.kind) {
var i = e.type;
"NamedType" === i.kind && t.add(i.name.value)
}
e.selectionSet && e.selectionSet.selections.forEach(function(e) {
n(e, t)
}), e.variableDefinitions && e.variableDefinitions.forEach(function(e) {
n(e, t)
}), e.definitions && e.definitions.forEach(function(e) {
n(e, t)
})
}
var a = {};
function o(e, t) {
for (var i = 0; i < e.definitions.length; i++) {
var n = e.definitions[i];
if (n.name && n.name.value == t) return n
}
}
function s(e, t) {
var i = {
kind: e.kind,
definitions: [o(e, t)]
};
e.hasOwnProperty("loc") && (i.loc = e.loc);
var n = a[t] || new Set,
s = new Set,
r = new Set;
n.forEach(function(e) {
r.add(e)
});
while (r.size > 0) {
var l = r;
r = new Set, l.forEach(function(e) {
if (!s.has(e)) {
s.add(e);
var t = a[e] || new Set;
t.forEach(function(e) {
r.add(e)
})
}
})
}
return s.forEach(function(t) {
var n = o(e, t);
n && i.definitions.push(n)
}), i
}(function() {
i.definitions.forEach(function(e) {
if (e.name) {
var t = new Set;
n(e, t), a[e.name.value] = t
}
})
})(), e.exports = i, e.exports["optionDelete"] = s(i, "optionDelete")
},
5203: function(e, t, i) {
"use strict";
var n = i("7a3c"),
a = i.n(n);
a.a
},
"529d": function(e, t, i) {},
"56d7": function(e, t, i) {
"use strict";
i.r(t);
var n = {};
i.r(n), i.d(n, "snackBar", function() {
return pa
}), i.d(n, "snackBarMessage", function() {
return va
}), i.d(n, "snackBarTimeout", function() {
return fa
}), i.d(n, "allowed", function() {
return ha
});
var a = {};
i.r(a), i.d(a, "snackBar", function() {
return ka
}), i.d(a, "allowed", function() {
return ga
});
var o = {};
i.r(o), i.d(o, "someAction", function() {
return ba
});
var s = i("2b0e"),
r = i("8c4f"),
l = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("main-layout", [void 0], 2)
},
d = [],
c = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("div", [i("navigation-drawer", {
attrs: {
show: e.drawer
}
}), i("header-custom", {
attrs: {
toggleDrawer: e.toggleDrawer
}
}), i("v-snackbar", {
attrs: {
timeout: e.$store.getters["utils/snackBarTimeout"],
"multi-line": "",
top: ""
},
model: {
value: e.snackBar,
callback: function(t) {
e.snackBar = t
},
expression: "snackBar"
}
}, [e._v("\n " + e._s(e.snackBarMessage) + "\n "), i("v-btn", {
attrs: {
color: "red",
flat: ""
},
on: {
click: function(t) {
e.snackBar = null
}
}
}, [i("v-icon", [e._v("close")])], 1)], 1), i("v-content", [e._t("default")], 2)], 1)
},
u = [],
m = function() {
var e = this,
t = e.$createElement,
n = e._self._c || t;
return e.allowed ? n("v-toolbar", {
attrs: {
color: "red",
dense: "",
fixed: "",
"clipped-left": "",
app: ""
}
}, [e.allowed ? [n("v-btn", {
attrs: {
flat: ""
},
on: {
click: function(t) {
return t.stopPropagation(), e.toggleDrawer(t)
}
}
}, [n("v-icon", {
attrs: {
color: "white"
}
}, [e._v("menu")])], 1), n("img", {
staticClass: "header-img",
attrs: {
src: i("0054")
}
}), n("v-toolbar-title", {
staticClass: "mr-5 align-center"
}, [n("span", {
staticClass: "title header-title"
}, [e._v("Pannello Amministrazione Rousseau")])]), n("v-spacer"), n("user-header", {
attrs: {
user: e.user
}
})] : e._e()], 2) : e._e()
},
p = [],
v = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-menu", {
attrs: {
"offset-y": ""
},
scopedSlots: e._u([{
key: "activator",
fn: function(t) {
var n = t.on;
return [i("v-btn", e._g({
attrs: {
flat: ""
}
}, n), [i("span", {
staticClass: "font-white"
}, [e._v(e._s(e.user.name))]), i("v-icon", {
attrs: {
color: "white"
}
}, [e._v("keyboard_arrow_down")])], 1)]
}
}])
}, [i("v-list", [i("v-list-tile", {
on: {
click: e.logout
}
}, [i("v-list-tile-title", [e._v("LOGOUT")])], 1)], 1)], 1)
},
f = [];
function h(e) {
return window.location.origin + e
}
var k = {
name: "UserHeader",
props: {
user: {
type: Object,
required: !0
}
},
methods: {
logout() {
this.$keycloak.logout({
redirectUri: h("/")
})
}
}
},
g = k,
b = (i("c603"), i("2877")),
_ = Object(b["a"])(g, v, f, !1, null, null, null),
N = _.exports;
const S = {
data() {
return {
user: {}
}
},
computed: {
isAuthenticated() {
return this.$keycloak.authenticated
}
},
watch: {
isAuthenticated(e) {
e && this.fetchUserInfo()
}
},
methods: {
fetchUserInfo() {
this.$keycloak.loadUserInfo().then(e => {
this.user = e, this.user.roles = this.$keycloak.resourceAccess
})
}
},
mounted() {
this.isAuthenticated && this.fetchUserInfo()
}
};
var y = {
name: "HeaderRousseau",
components: {
"user-header": N
},
computed: {
allowed() {
return this.$store.getters["utils/allowed"]
}
},
props: {
toggleDrawer: {
type: Function,
required: !0
}
},
mixins: [S]
},
E = y,
D = (i("a211"), Object(b["a"])(E, m, p, !1, null, "73b09bc9", null)),
C = D.exports,
w = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-navigation-drawer", {
attrs: {
fixed: "",
clipped: "",
app: "",
dark: e.allowed
},
model: {
value: e.show,
callback: function(t) {
e.show = t
},
expression: "show"
}
}, [i("v-list", {
attrs: {
dense: ""
}
}, e._l(e.userRoles, function(t) {
return i("v-list-tile", {
key: t.roleName,
on: {
click: function(i) {
return e.$router.push({
name: t.routeName
})
}
}
}, [i("v-list-tile-action", [i("v-icon", [e._v(e._s(t.icon))])], 1), i("v-list-tile-content", [i("v-list-tile-title", {
staticClass: "font-white"
}, [e._v(e._s(t.resourceTitle))])], 1)], 1)
}), 1)], 1)
},
x = [];
const P = [{
clientName: "camelot-backend",
roleName: "admin",
routeName: "admin",
resourceTitle: "Cerca Utente",
icon: "search"
}, {
clientName: "camelot-backend",
roleName: "view-permissions",
routeName: "view-permissions",
resourceTitle: "Vedi Permessi",
icon: "control_camera"
}, {
clientName: "camelot-backend",
roleName: "view-poll-results",
routeName: "view-poll-results",
resourceTitle: "Risultati Votazioni",
icon: "poll"
}, {
clientName: "camelot-backend",
roleName: "manage-certification",
routeName: "manage-certification",
resourceTitle: "Gestisci certificazioni",
icon: "drag_handle"
}];
var O = {
name: "NavigationDrawer",
mixins: [S],
props: {
show: {
type: Boolean,
required: !0
}
},
data() {
return {
adminRoles: P
}
},
computed: {
allowed() {
return this.$store.getters["utils/allowed"]
},
userRoles: function() {
if (!this.user || !this.user.roles) return [];
try {
const t = this.adminRoles.filter(e => {
return this.user.roles[e.clientName].roles.indexOf(e.roleName) >= 0
});
return this.$store.commit("utils/allowed", !0), t
} catch (e) {
return window.location.replace("https://vote.rousseau.movimento5stelle.it")
}
}
}
},
$ = O,
F = (i("9e99"), Object(b["a"])($, w, x, !1, null, "217b2a6c", null)),
V = F.exports,
R = {
name: "MainLayout",
components: {
"header-custom": C,
"navigation-drawer": V
},
data: () => ({
drawer: !1
}),
computed: {
allowed() {
return this.$store.getters["utils/allowed"]
},
snackBar: {
get() {
return this.$store.getters["utils/snackBar"]
},
set(e) {
this.$store.commit("utils/snackBar", e)
}
},
snackBarMessage() {
return this.$store.getters["utils/snackBarMessage"]
}
},
methods: {
toggleDrawer() {
this.drawer = !this.drawer
}
}
},
q = R,
T = Object(b["a"])(q, c, u, !1, null, null, null),
A = T.exports,
I = {
name: "Admin",
components: {
"main-layout": A
}
},
j = I,
L = Object(b["a"])(j, l, d, !1, null, null, null),
U = L.exports,
G = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("main-layout", [
[i("v-container", {
staticClass: "justify-center",
attrs: {
"text-xs-center": ""
}
}, [i("div", {
staticClass: "f-h2 f-bold"
}, [e._v(e._s(e.$t("search.title")))]), i("v-text-field", {
attrs: {
solo: "",
label: "Ricerca Utenti"
},
on: {
change: e.searchInput
},
model: {
value: e.input,
callback: function(t) {
e.input = t
},
expression: "input"
}
}), i("admin-table", {
attrs: {
items: e.checkNull("this.users.nodes", []),
update: e.fetchMore
}
})], 1)]
], 2)
},
B = [],
z = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-card", [i("v-data-table", {
staticClass: "elevation-0 table-padding",
attrs: {
headers: e.headers,
items: e.items,
pagination: e.pagination
},
on: {
"update:pagination": [function(t) {
e.pagination = t
}, e.update]
},
scopedSlots: e._u([{
key: "headers",
fn: function(t) {
return e._l(t.headers, function(t, n) {
return i("th", {
key: n,
class: ["row sortable", 0 === n ? "text-xs-left" : ""],
on: {
click: function(i) {
return e.changeSort(t.value)
}
}
}, ["go" !== t.value && t.value === e.pagination.sortBy ? i("v-icon", {
attrs: {
small: "",
color: "rgba(255, 0, 0, 1)"
}
}, [e._v("\n " + e._s(e.pagination.descending ? "expand_less" : "expand_more") + "\n ")]) : "go" !== t.value ? i("v-icon", {
attrs: {
small: "",
color: "rgba(0, 0, 0, 0.1)"
}
}, [e._v("\n expand_less\n ")]) : e._e(), i("span", {
staticClass: "table-header-left-margin f-bold"
}, [e._v(e._s(t.text))])], 1)
})
}
}, {
key: "items",
fn: function(t) {
return [i("tr", [i("td", {
staticClass: "text-xs-center"
}, [e._v(e._s(t.item.firstName))]), i("td", {
staticClass: "text-xs-center"
}, [e._v(e._s(t.item.lastName))]), i("td", {
staticClass: "text-xs-center"
}, [e._v(e._s(t.item.email))]), i("td", {
staticClass: "text-xs-center"
}, [e._v(e._s(t.item.phoneNumber))]), i("td", {
staticClass: "text-xs-center"
}, [e._v(e._s(t.item.codiceFiscale))]), i("td", {
staticClass: "text-xs-center"
}, [i("v-btn", {
attrs: {
flat: ""
},
on: {
click: function(i) {
return e.$router.push("admin/" + t.item.slug)
}
}
}, [i("v-icon", [e._v("play_circle_outline")])], 1)], 1)])]
}
}, {
key: "expand",
fn: function(t) {
return [i("v-card", {
attrs: {
flat: ""
}
}, [i("v-card-text", [e._v(e._s(t.item))])], 1)]
}
}])
}, [i("template", {
slot: "no-data"
}, [i("p", [e._v("Nessun risultato")])])], 2)], 1)
},
M = [],
Q = {
name: "AdminTable",
data() {
return {
pagination: {
sortBy: "firstName",
descending: !1,
rowsPerPage: 10
},
headers: [{
text: "Nome",
value: "firstName"
}, {
text: "Cognome",
value: "lastName"
}, {
text: "Email",
value: "email"
}, {
text: "Telefono",
value: "phoneNumber"
}, {
text: "Codice Fiscale",
value: "codiceFiscale"
}, {
text: "Vai",
value: "go"
}]
}
},
props: {
items: {
type: Array,
required: !0
},
update: {
type: Function,
required: !0
}
},
methods: {
changeSort(e) {
e !== this.pagination.sortBy ? (this.pagination.descending = !1, this.pagination.sortBy = e) : this.pagination.descending = !this.pagination.descending, console.log(this.pagination)
}
}
},
Y = Q,
H = (i("7e61"), Object(b["a"])(Y, z, M, !1, null, "1a9b962c", null)),
K = H.exports,
J = i("391b"),
W = i("414a"),
Z = {
name: "Admin",
components: {
"main-layout": A,
"admin-table": K
},
data() {
return {
input: "",
search: "",
skip: !0,
users: {
pageInfo: {},
nodes: []
}
}
},
apollo: {
users: {
query: J["users"],
variables() {
return {
search: this.search
}
},
skip() {
return this.skip
}
}
},
mixins: [W["a"]],
methods: {
async searchInput() {
"" !== this.input ? (this.skip = !1, this.search = this.input, this.$apollo.queries.users.refetch()) : this.users = {
pageInfo: {},
nodes: []
}
},
async fetchMore() {
this.users.pageInfo.hasNextPage && this.$apollo.queries.users.fetchMore({
variables: {
search: this.search,
after: this.users.pageInfo.endCursor
},
updateQuery: (e, {
fetchMoreResult: t
}) => {
this.users.pageInfo = t.users.pageInfo, t.users.nodes.forEach(e => this.users.nodes.push(e))
}
})
}
}
},
X = Z,
ee = Object(b["a"])(X, G, B, !1, null, null, null),
te = ee.exports,
ie = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("main-layout", [
[i("v-container", {
staticClass: "justify-center",
attrs: {
"text-xs-center": ""
}
}, [i("div", {
staticClass: "f-h2 f-bold"
}, [e._v(e._s(e.$t("userDetail.title")))]), i("br"), i("v-layout", {
attrs: {
"justify-center": "",
wrap: ""
}
}, [i("v-flex", {
staticClass: "card-column",
attrs: {
xs11: "",
sm9: "",
md6: "",
center: ""
}
}, [i("main-card", {
staticClass: "card-margin",
attrs: {
user: e.checkNull("this.users.nodes", []).length > 0 ? e.users.nodes[0] : {},
update: e.update
}
}), i("anagraph-card", {
staticClass: "card-margin",
attrs: {
user: e.checkNull("this.users.nodes", []).length > 0 ? e.users.nodes[0] : {},
update: e.update
}
})], 1), i("v-flex", {
attrs: {
xs11: "",
sm9: "",
md6: "",
center: ""
}
}, [i("setting-card", {
staticClass: "card-margin",
attrs: {
user: e.checkNull("this.users.nodes", []).length > 0 ? e.users.nodes[0] : {}
}
}), i("preference-card", {
staticClass: "card-margin",
attrs: {
user: e.checkNull("this.users.nodes", []).length > 0 ? e.users.nodes[0] : {}
}
})], 1)], 1), e.checkNull("this.users.nodes", null) && e.users.nodes[0] && e.users.nodes[0].identityVerificationRequests && e.users.nodes[0].identityVerificationRequests.nodes && e.users.nodes[0].identityVerificationRequests.nodes.length > 0 ? i("h2", [e._v("\n " + e._s(e.$t("userDetail.certification")) + "\n ")]) : e._e(), e.checkNull("this.users.nodes", null) && e.users.nodes[0] && e.users.nodes[0].identityVerificationRequests && e.users.nodes[0].identityVerificationRequests.nodes && e.users.nodes[0].identityVerificationRequests.nodes.length > 0 ? i("v-layout", {
attrs: {
"justify-center": "",
row: "",
wrap: ""
}
}, e._l(e.users.nodes[0].identityVerificationRequests.nodes, function(e, t) {
return i("history-element-card", {
key: t,
staticClass: "card-margin-10",
attrs: {
request: e
}
})
}), 1) : e._e(), i("v-layout", {
attrs: {
"align-end": ""
}
}, [i("div", {
staticClass: "link-poll"
}, [i("i", {
staticClass: "fas fa-angle-double-left"
}), e._v(" \n "), i("router-link", {
staticClass: "link-poll-text",
attrs: {
to: "/admin"
}
}, [i("span", [e._v(e._s(e.$t("userDetail.back")))])])], 1), i("v-spacer"), i("v-btn", {
attrs: {
color: "red",
outline: ""
},
on: {
click: function(t) {
e.confirm = !0
}
}
}, [e._v("\n " + e._s(e.$t("userDetail.delete")) + "\n ")])], 1), i("confirm-dialog", {
attrs: {
dialog: e.confirm,
closeDialog: function() {
return e.confirm = !1
},
action: e.doDelete,
description: e.$t("dialog.delete_description")
}
}), i("error-dialog", {
attrs: {
dialog: e.error,
closeDialog: function() {
return e.error = !1
}
}
})], 1)]
], 2)
},
ne = [],
ae = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-dialog", {
attrs: {
width: "500px"
},
model: {
value: e.dialog,
callback: function(t) {
e.dialog = t
},
expression: "dialog"
}
}, [i("v-card", [i("v-card-title", {
staticClass: "justify-center",
attrs: {
"primary-title": ""
}
}, [i("div", {
staticClass: "card-error f-h2"
}, [e._v(e._s(e.$t("manageCertification.acceptDialog.title")))])]), i("div", {
staticClass: "card-error f-h3"
}, [e._v(e._s(e.$t("manageCertification.rejectDialog.error")))]), i("v-divider"), i("v-card-actions", [i("v-spacer"), i("v-btn", {
attrs: {
flat: ""
},
on: {
click: e.closeDialog
}
}, [e._v("\n " + e._s(e.$t("manageCertification.acceptDialog.buttonOK")) + "\n ")])], 1), i("div", {
staticClass: "card-red-border"
})], 1)], 1)
},
oe = [],
se = {
name: "ErrorDialog",
props: {
dialog: {
type: Boolean,
required: !0
},
closeDialog: {
type: Function,
required: !0
}
}
},
re = se,
le = (i("9933"), Object(b["a"])(re, ae, oe, !1, null, "8ed7eff2", null)),
de = le.exports,
ce = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-dialog", {
attrs: {
width: "500px"
},
model: {
value: e.dialog,
callback: function(t) {
e.dialog = t
},
expression: "dialog"
}
}, [i("v-card", [i("v-card-title", {
staticClass: "justify-center",
attrs: {
"primary-title": ""
}
}, [i("div", {
staticClass: "card-message f-h2"
}, [e._v(e._s(e.$t("dialog.confirm_dialog_title")))])]), i("p", {
staticClass: "card-message f-h3"
}, [e._v(e._s(e.description))]), i("v-divider"), i("v-card-actions", {
staticClass: "card-padding"
}, [i("v-btn", {
attrs: {
outline: "",
color: "red"
},
on: {
click: e.closeDialog
}
}, [e._v("\n " + e._s(e.$t("dialog.button_cancel")) + "\n ")]), i("v-spacer"), i("v-btn", {
attrs: {
outline: "",
color: "primary"
},
on: {
click: e.doConfirm
}
}, [e._v("\n " + e._s(e.$t("dialog.button_confirm")) + "\n ")])], 1), i("div", {
staticClass: "card-red-border"
})], 1)], 1)
},
ue = [],
me = {
name: "ConfirmDialog",
props: {
dialog: {
type: Boolean,
required: !0
},
description: {
type: String,
required: !0
},
closeDialog: {
type: Function,
required: !0
},
action: {
type: Function,
required: !0
}
},
methods: {
doConfirm() {
this.action(), this.closeDialog()
}
}
},
pe = me,
ve = (i("9328"), Object(b["a"])(pe, ce, ue, !1, null, "5f6d7f02", null)),
fe = ve.exports,
he = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-card", {
staticClass: "card-content"
}, [i("v-list", [i("v-list-tile", [e._v("\n " + e._s(e.$t("userDetail.mainCard.firstName")) + "\n "), i("v-spacer"), i("editable-field", {
attrs: {
field: e.user.firstName ? e.user.firstName : "",
fieldName: "firstName",
update: e.update
}
})], 1), i("v-list-tile", [e._v("\n " + e._s(e.$t("userDetail.mainCard.lastName")) + "\n "), i("v-spacer"), i("editable-field", {
attrs: {
field: e.user.lastName ? e.user.lastName : "",
fieldName: "lastName",
update: e.update
}
})], 1), i("v-list-tile", [e._v("\n " + e._s(e.$t("userDetail.mainCard.email")) + "\n "), i("v-spacer"), i("editable-field", {
attrs: {
field: e.user.email ? e.user.email : "",
fieldName: "email",
update: e.update
}
})], 1), i("v-list-tile", [e._v("\n " + e._s(e.$t("userDetail.mainCard.phoneNumber")) + "\n "), i("v-spacer"), i("editable-field", {
attrs: {
field: e.user.phoneNumber ? e.user.phoneNumber : "",
fieldName: "phoneNumber",
update: e.update
}
})], 1), i("v-list-tile", [e._v("\n " + e._s(e.$t("userDetail.mainCard.codiceFiscale")) + "\n "), i("v-spacer"), i("b", [e._v(e._s(e.checkNull("this.user.codiceFiscale", e.$t("userDetail.placeholder"))))])], 1)], 1)], 1)
},
ke = [],
ge = function() {
var e = this,
t = e.$createElement,
i = e._self._c || t;
return i("v-layout", {
attrs: {
"justify-end": ""
}
}, [e.edit ? i("v-layout", {
attrs: {
row: ""
}
}, [i("v-text-field", {
staticStyle: {
width: "20px"
},
attrs: {
placeholder: e.field,
height: 20,
autofocus: ""
},
on: {
keyup: function(t) {
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.saveField(t)
}
},
model: {
value: e.model,
callback: function(t) {
e.model = t
},
expression: "model"
}
}), i("v-btn", {
staticClass: "icon-button",
attrs: {
flat: ""
},
on: {
click: e.saveField
}
}, [i("v-icon", {
attrs: {
small: "",
color: "red"
}
}, [e._v("fas fa-save")])], 1)], 1) : i("span", [i("b", [e._v(e._s(e.checkNull("this.field", e.$t("userDetail.placeholder"))))]), i("v-btn", {
staticClass: "icon-button",
attrs: {
flat: ""
},
on: {
click: function(t) {
e.edit = !0
}
}
}, [i("v-icon", {
attrs: {
small: "",
color: "red"
}
}, [e._v("fas fa-pencil-alt")])], 1)], 1)], 1)
},
be = [],
_e = {
name: "EditableField",
data() {
return {
edit: !1,
model: ""
}
},
props: {
field: {
type: String,
required: !0
},
fieldName: {
type: String,
required: !0
},
update: {
type: Function,
required: !0
}
},
mixins: [W["a"]],
methods: {
saveField() {
switch (this.edit = !1, this.fieldName) {
case "email":
this.update({
email: this.model ? this.model : this.field
});
break;
case "phoneNumber":
this.update({
phoneNumber: this.model ? this.model : this.field
});
break;
case "dateOfBirth":
this.update({
dateOfBirth: this.model ? this.model : this.field
});
break;
case "firstName":
this.update({
firstName: this.model ? this.model : this.field
});
break;
case "lastName":
this.update({
lastName: this.model ? this.model : this.field
});
break
}
}
}
},
Ne = _e,
Se = (i("7701"), Object(b["a"])(Ne, ge, be, !1, null, "c1311752", null)),