Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(t) {
- function e(e) {
- for (var r, n, o = e[0], c = e[1], l = e[2], d = 0, p = []; d < o.length; d++)
- n = o[d],
- a[n] && p.push(a[n][0]),
- a[n] = 0;
- for (r in c)
- Object.prototype.hasOwnProperty.call(c, r) && (t[r] = c[r]);
- u && u(e);
- while (p.length)
- p.shift()();
- return i.push.apply(i, l || []),
- s()
- }
- function s() {
- for (var t, e = 0; e < i.length; e++) {
- for (var s = i[e], r = !0, o = 1; o < s.length; o++) {
- var c = s[o];
- 0 !== a[c] && (r = !1)
- }
- r && (i.splice(e--, 1),
- t = n(n.s = s[0]))
- }
- return t
- }
- var r = {}
- , a = {
- app: 0
- }
- , i = [];
- function n(e) {
- if (r[e])
- return r[e].exports;
- var s = r[e] = {
- i: e,
- l: !1,
- exports: {}
- };
- return t[e].call(s.exports, s, s.exports, n),
- s.l = !0,
- s.exports
- }
- n.m = t,
- n.c = r,
- n.d = function(t, e, s) {
- n.o(t, e) || Object.defineProperty(t, e, {
- enumerable: !0,
- get: s
- })
- }
- ,
- n.r = function(t) {
- "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
- value: "Module"
- }),
- Object.defineProperty(t, "__esModule", {
- value: !0
- })
- }
- ,
- n.t = function(t, e) {
- if (1 & e && (t = n(t)),
- 8 & e)
- return t;
- if (4 & e && "object" === typeof t && t && t.__esModule)
- return t;
- var s = Object.create(null);
- if (n.r(s),
- Object.defineProperty(s, "default", {
- enumerable: !0,
- value: t
- }),
- 2 & e && "string" != typeof t)
- for (var r in t)
- n.d(s, r, function(e) {
- return t[e]
- }
- .bind(null, r));
- return s
- }
- ,
- n.n = function(t) {
- var e = t && t.__esModule ? function() {
- return t["default"]
- }
- : function() {
- return t
- }
- ;
- return n.d(e, "a", e),
- e
- }
- ,
- n.o = function(t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }
- ,
- n.p = "";
- var o = window["webpackJsonp"] = window["webpackJsonp"] || []
- , c = o.push.bind(o);
- o.push = e,
- o = o.slice();
- for (var l = 0; l < o.length; l++)
- e(o[l]);
- var u = c;
- i.push([0, "chunk-vendors"]),
- s()
- }
- )({
- 0: function(t, e, s) {
- t.exports = s("56d7")
- },
- "009b": function(t, e, s) {},
- "03fa": function(t, e, s) {
- "use strict";
- var r = s("7ccc")
- , a = s.n(r);
- a.a
- },
- "07a3": function(t, e, s) {},
- "0f42": function(t, e, s) {
- "use strict";
- var r = s("26d2")
- , a = s.n(r);
- a.a
- },
- "10fe": function(t, e, s) {
- "use strict";
- var r = s("5a61")
- , a = s.n(r);
- a.a
- },
- "1b77": function(t, e, s) {},
- "1dd1": function(t, e, s) {},
- "26d2": function(t, e, s) {},
- "2e1c": function(t, e, s) {
- "use strict";
- var r = s("41ee")
- , a = s.n(r);
- a.a
- },
- "41a3": function(t, e, s) {
- "use strict";
- var r = s("7852")
- , a = s.n(r);
- a.a
- },
- "41ee": function(t, e, s) {},
- "42f0": function(t, e, s) {},
- "56d7": function(t, e, s) {
- "use strict";
- s.r(e);
- s("cadf"),
- s("551c"),
- s("f751"),
- s("097d");
- var r = s("2b0e")
- , a = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "app"
- }, [s("Navbar"), s("router-view"), t._m(0)], 1)
- }
- , i = [function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("footer", {
- staticClass: "footer"
- }, [s("div", {
- staticClass: "content has-text-centered"
- }, [s("p", [s("strong", [t._v("Praca ZSE")])]), s("p", [t._v("Wszelkie prawa zastrzeżone.")])])])
- }
- ]
- , n = function() {
- var t = this
- , e = t.$createElement
- , r = t._self._c || e;
- return r("nav", {
- staticClass: "navbar",
- attrs: {
- role: "navigation",
- "aria-label": "main navigation"
- }
- }, [r("div", {
- staticClass: "navbar-brand"
- }, [r("router-link", {
- attrs: {
- to: "/"
- }
- }, [r("a", {
- staticClass: "navbar-item",
- attrs: {
- href: "https://praca.zse.krakow.pl"
- }
- }, [r("img", {
- staticClass: "image logo",
- attrs: {
- src: s("cf05")
- }
- }), r("strong", [t._v("Praca ZSE")])])]), t._m(0)], 1), r("div", {
- staticClass: "navbar-menu",
- attrs: {
- id: "navbar"
- }
- }, [r("div", {
- staticClass: "navbar-start"
- }, [r("router-link", {
- attrs: {
- to: "/"
- }
- }, [r("a", {
- staticClass: "navbar-item"
- }, [t._v("Przeglądaj ogłoszenia")])]), r("router-link", {
- attrs: {
- to: "/users"
- }
- }, [r("a", {
- staticClass: "navbar-item"
- }, [t._v("przeglądaj profile")])]), r("div", ["" != this.$store.getters.token ? r("a", {
- staticClass: "navbar-item",
- on: {
- click: t.showProfile
- }
- }, [t._v("Profil")]) : t._e()]), r("div", [2 == this.$store.getters.accesLvl ? r("a", {
- staticClass: "navbar-item",
- on: {
- click: t.showAdmin
- }
- }, [t._v("Panel Administratora")]) : t._e()])], 1), r("div", {
- staticClass: "navbar-end"
- }, [r("div", {
- staticClass: "navbar-item"
- }, [r("div", {
- staticClass: "buttons"
- }, ["" == this.$store.getters.token ? r("router-link", {
- attrs: {
- to: "/register"
- }
- }, [r("a", {
- key: "register",
- staticClass: "button is-primary"
- }, [r("strong", [t._v("Zarejestruj się")])])]) : r("router-link", {
- attrs: {
- to: "/"
- }
- }, [r("a", {
- key: "logout",
- staticClass: "button is-primary",
- on: {
- click: t.logout
- }
- }, [r("strong", [t._v("Wyloguj się")])])]), "" == this.$store.getters.token ? r("router-link", {
- key: "login",
- attrs: {
- to: "/login"
- }
- }, [r("a", {
- staticClass: "button is-light"
- }, [t._v("Zaloguj się")])]) : t._e()], 1)])])])])
- }
- , o = [function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("a", {
- staticClass: "navbar-burger burger",
- attrs: {
- role: "button",
- "aria-label": "menu",
- "aria-expanded": "false",
- "data-target": "navbar"
- }
- }, [s("span", {
- attrs: {
- "aria-hidden": "true"
- }
- }), s("span", {
- attrs: {
- "aria-hidden": "true"
- }
- }), s("span", {
- attrs: {
- "aria-hidden": "true"
- }
- })])
- }
- ]
- , c = (s("ac6a"),
- s("cebc"))
- , l = s("2f62")
- , u = {
- name: "Navbar",
- methods: {
- logout: function() {
- this.$store.commit("set", ""),
- this.$store.commit("setID", ""),
- this.$store.commit("setAccesLvl", ""),
- this.$router.push("/")
- },
- showProfile: function() {
- this.url = "/profile?id=".concat(this.$store.getters.id),
- console.log(this.url),
- this.$router.push(this.url)
- },
- showAdmin: function() {
- this.url = "/admin",
- this.$router.push(this.url)
- }
- },
- data: function() {
- return {
- url: ""
- }
- },
- computed: Object(c["a"])({}, Object(l["b"])(["id"]), {
- ComputedLocalState: function() {
- return this.url = "/profile?id=".concat(this.$store.getters.id),
- this.id
- }
- }),
- watch: {
- id: function(t, e) {
- console.log(t, e)
- }
- }
- };
- document.addEventListener("DOMContentLoaded", function() {
- var t = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0);
- t.length > 0 && t.forEach(function(t) {
- t.addEventListener("click", function() {
- var e = t.dataset.target
- , s = document.getElementById(e);
- t.classList.toggle("is-active"),
- s.classList.toggle("is-active")
- })
- })
- });
- var d = u
- , p = (s("b28f"),
- s("2877"))
- , h = Object(p["a"])(d, n, o, !1, null, "8b74d570", null)
- , m = h.exports
- , v = {
- name: "App",
- components: {
- Navbar: m
- }
- }
- , f = v
- , g = (s("dcef"),
- Object(p["a"])(f, a, i, !1, null, "c8b4d7cc", null))
- , _ = g.exports
- , b = s("8c4f")
- , w = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper"
- }, [s("searchInput", {
- on: {
- input: t.handleInput
- },
- model: {
- value: t.searchValue,
- callback: function(e) {
- t.searchValue = e
- },
- expression: "searchValue"
- }
- }), s("AdvertisementsList", {
- attrs: {
- results: t.results
- }
- }), "" == !this.$store.getters.token ? s("AddAdvertisementButton") : t._e()], 1)
- }
- , k = []
- , y = s("bc3a")
- , C = s.n(y)
- , z = s("f7fe")
- , j = s.n(z)
- , $ = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control"
- }, [s("label", {
- attrs: {
- for: "search"
- }
- }, [t._v("Wyszukaj")]), s("input", {
- staticClass: "input is-medium is-rounded is-primary",
- attrs: {
- type: "text",
- placeholder: "Czego szukasz?"
- },
- domProps: {
- value: t.value
- },
- on: {
- input: t.handleChange
- }
- })])])
- }
- , E = []
- , N = {
- name: "SearchInput",
- props: {
- value: {
- type: String,
- required: !0
- }
- },
- methods: {
- handleChange: function(t) {
- this.$emit("input", t.target.value)
- }
- }
- }
- , x = N
- , P = (s("dc76"),
- Object(p["a"])(x, $, E, !1, null, "3fa91a7c", null))
- , A = P.exports
- , O = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "advertisementsWrapper"
- }, t._l(t.results, function(e) {
- return s("div", {
- key: e.id,
- staticClass: "box"
- }, [s("router-link", {
- attrs: {
- to: {
- path: "advertisement",
- query: {
- id: e.id
- }
- }
- }
- }, [s("article", {
- staticClass: "media"
- }, [s("div", {
- staticClass: "media-left"
- }, [s("figure", {
- staticClass: "image is-64x64"
- }, [t._v("\n " + t._s(e.signature.toUpperCase().substring(0, 2)) + "\n ")])]), s("div", {
- staticClass: "media-content"
- }, [s("div", {
- staticClass: "content"
- }, [s("p", [s("strong", [t._v(t._s(e.title))]), s("br"), t._v("\n " + t._s(e.signature) + "\n ")])])])])])], 1)
- }), 0)
- }
- , I = []
- , L = {
- name: "AdvertisementsList",
- props: {
- results: {
- type: Array,
- required: !0
- }
- },
- methods: {}
- }
- , q = L
- , S = (s("913f"),
- Object(p["a"])(q, O, I, !1, null, "28a16e61", null))
- , B = S.exports
- , Z = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "addAdverisementButton",
- attrs: {
- title: "Dodaj nowe ogłoszenie."
- },
- on: {
- click: t.redirect
- }
- }, [s("span", [t._v("+")])])
- }
- , R = []
- , V = {
- name: "AddAdvertisementButton",
- props: {},
- methods: {
- redirect: function() {
- this.$router.push("/advertisement/add")
- }
- }
- }
- , U = V
- , D = (s("ea15"),
- Object(p["a"])(U, Z, R, !1, null, "4454fdbe", null))
- , H = D.exports
- , W = "https://praca.zse.krakow.pl/api"
- , T = {
- name: "Home",
- data: function() {
- return {
- searchValue: "",
- results: []
- }
- },
- components: {
- SearchInput: A,
- AdvertisementsList: B,
- AddAdvertisementButton: H
- },
- methods: {
- handleInput: j()(function() {
- var t = this;
- C.a.get("".concat(W, "/advertisements/search.php?s=").concat(this.searchValue)).then(function(e) {
- console.log(e.data.records),
- t.results = e.data.records
- }).catch(function(e) {
- t.results = {
- 0: {
- title: "Niestety, nic nie znaleziono.",
- signature: "Błąd"
- }
- }
- })
- }, 500)
- },
- mounted: function() {
- var t = this;
- C.a.get("".concat(W, "/advertisements/read.php")).then(function(e) {
- console.log(e.data.records),
- t.results = e.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }
- }
- , M = T
- , F = (s("a824"),
- Object(p["a"])(M, w, k, !1, null, "5948f5a5", null))
- , J = F.exports
- , K = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v(t._s(t.results.title))]), s("p", {
- staticClass: "description"
- }, [t._v(t._s(t.results.description))]), s("br"), s("p", {
- staticClass: "signature"
- }, [s("a", {
- on: {
- click: t.getCreator
- }
- }, [t._v(t._s(t.results.signature))])]), s("br"), t.owned_by_user ? s("span", {
- staticClass: "edit",
- attrs: {
- title: "edytuj ogłoszenie"
- },
- on: {
- click: t.redirect
- }
- }, [t._m(0)]) : t._e()])])])
- }
- , G = [function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("p", [s("i", {
- staticClass: "far fa-edit"
- })])
- }
- ]
- , Q = "https://praca.zse.krakow.pl/api"
- , X = {
- name: "Advertisement",
- data: function() {
- return {
- results: [],
- user_id: "",
- owned_by_user: !1
- }
- },
- components: {},
- methods: {
- redirect: function() {
- this.$router.push("/advertisement/edit?id=".concat(this.$route.query.id))
- },
- getCreator: function() {
- this.url = "/profile?id=".concat(this.results.creator_id),
- this.$router.push(this.url)
- }
- },
- mounted: function() {
- var t = this;
- null != this.$route.query.id ? C.a.get("".concat(Q, "/advertisements/read_one.php?id=").concat(this.$route.query.id)).then(function(e) {
- t.results = e.data,
- t.user_id = t.$store.getters.id,
- t.user_id == t.results.creator_id ? t.owned_by_user = !0 : t.owned_by_user = !1
- }) : his.$router.push("/")
- },
- created: function() {}
- }
- , Y = X
- , tt = (s("03fa"),
- Object(p["a"])(Y, K, G, !1, null, "d590d698", null))
- , et = tt.exports
- , st = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper container is-fluid"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v("Zaloguj się")]), s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control has-text-centered"
- }, [s("form", [s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.email,
- expression: "email"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "email",
- placeholder: "email"
- },
- domProps: {
- value: t.email
- },
- on: {
- input: function(e) {
- e.target.composing || (t.email = e.target.value)
- }
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.password,
- expression: "password"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "password",
- placeholder: "hasło"
- },
- domProps: {
- value: t.password
- },
- on: {
- input: function(e) {
- e.target.composing || (t.password = e.target.value)
- }
- }
- }), s("br"), s("a", {
- staticClass: "button is-primary",
- on: {
- click: t.login
- },
- nativeOn: {
- keyup: function(e) {
- return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : t.login(e)
- }
- }
- }, [t._v("Zaloguj się")])])])]), s("div", {
- staticClass: "is-danger notification",
- class: {
- "is-invisible": t.hasNotError
- }
- }, [s("p", [t._v("Podano błędny adres email lub hasło.")])])])])])
- }
- , rt = []
- , at = "https://praca.zse.krakow.pl/api"
- , it = {
- name: "Login",
- data: function() {
- return {
- email: "",
- password: "",
- token: "",
- hasNotError: !0,
- user_permission: "",
- user_id: ""
- }
- },
- components: {},
- methods: {
- login: function() {
- var t = this;
- C.a.post("".concat(at, "/auth/login.php"), {
- email: "".concat(this.email),
- password: "".concat(this.password)
- }).then(function(e) {
- t.hasNotError = !0,
- t.token = e.data.token,
- t.$store.commit("set", t.token),
- C.a.post("".concat(at, "/auth/check.php"), {
- token: t.$store.getters.token
- }).then(function(e) {
- t.user_id = e.data.user_id,
- t.user_permission = e.data.user_permission,
- t.$store.commit("setID", t.user_id),
- console.log(),
- t.$store.commit("setAccesLvl", t.user_permission),
- t.$router.push("/")
- }).catch(function(e) {
- t.hasNotError = !1
- })
- }).catch(function(e) {
- t.hasNotError = !1
- })
- },
- mounted: function() {}
- }
- }
- , nt = it
- , ot = (s("ebf5"),
- Object(p["a"])(nt, st, rt, !1, null, "c2f60e90", null))
- , ct = ot.exports
- , lt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper container is-fluid"
- }, [s("div", {
- staticClass: "modal is-clipped",
- class: {
- "is-active": this.isPoliticyActive
- }
- }, [s("div", {
- staticClass: "modal-background"
- }), s("div", {
- staticClass: "modal-card"
- }, [s("header", {
- staticClass: "modal-card-head"
- }, [s("p", {
- staticClass: "modal-card-title"
- }, [t._v("Regulamin")]), s("button", {
- staticClass: "delete",
- attrs: {
- "aria-label": "close"
- },
- on: {
- click: t.closePoliticy
- }
- })]), t._m(0)])]), s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v("Zarejestruj się")]), s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control has-text-centered"
- }, [s("form", [s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.email,
- expression: "email"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "email",
- placeholder: "email"
- },
- domProps: {
- value: t.email
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.email = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.password,
- expression: "password"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "password",
- placeholder: "hasło"
- },
- domProps: {
- value: t.password
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.password = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.password2,
- expression: "password2"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "password",
- placeholder: "powtórz hasło"
- },
- domProps: {
- value: t.password2
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.password2 = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.name,
- expression: "name"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text",
- placeholder: "nazwa kontaktowa"
- },
- domProps: {
- value: t.name
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.name = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("a", {
- staticClass: "button is-primary",
- on: {
- click: t.register,
- keyup: function(e) {
- return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : t.register(e)
- }
- }
- }, [t._v("Zarejestruj się")])]), s("br"), s("p", [t._v("\n Rejestrując się akceptujesz\n "), s("span", {
- staticStyle: {
- color: "hsl(171, 100%, 41%)",
- cursor: "pointer"
- },
- on: {
- click: t.showPoliticy
- }
- }, [t._v("regulamin.")])])])]), s("div", {
- staticClass: "is-danger notification",
- class: {
- "is-invisible": t.hasNotError
- }
- }, [s("p", [t._v(t._s(this.error))])])])])])
- }
- , ut = [function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("section", {
- staticClass: "modal-card-body"
- }, [s("strong", [t._v("Polityka prywatności opisuje zasady przetwarzania przez nas informacji na Twój temat.")]), s("br"), s("p", [s("strong", [t._v("Informacje ogólne")]), s("br"), t._v("Ta polityka dotyczy Serwisu, funkcjonującego pod adresem : praca.zse.krakow.pl\n "), s("br"), t._v("Administratorem danych osobowych jest: Zespół Szkół Energetycznych nr 9 w Krakowie Loretańska 16, 31-118 Kraków\n "), s("br"), t._v("Adres kontaktowy poczty elektronicznej operatora: kacperszot1@gmail.com\n "), s("br"), t._v("Operator jest Administratorem Twoich danych osobowych w odniesieniu do danych podanych dobrowolnie w Serwisie.\n "), s("br"), t._v("Serwis wykorzystuje dane osobowe w następujących celach:\n "), s("br"), t._v("Prowadzenie systemu ogłoszeń drobnych\n "), s("br"), t._v("Prezentacja profil użytkownika innym użytkownikom\n "), s("br"), t._v("Wyświetlanie ogłoszeń użytkowników\n "), s("br"), t._v("Obsługa zapytań przez formularz\n "), s("br"), t._v("Prezentacja oferty lub informacji\n "), s("br"), t._v("Serwis realizuje funkcje pozyskiwania informacji o użytkownikach i ich zachowaniu w następujący sposób:\n "), s("br"), t._v("Poprzez dobrowolnie wprowadzone w formularzach dane, które zostają wprowadzone do systemów Operatora.\n "), s("br"), t._v("Poprzez zapisywanie w urządzeniach końcowych plików cookie (tzw. „ciasteczka”).\n "), s("br")])])
- }
- ]
- , dt = (s("7f7f"),
- "https://praca.zse.krakow.pl/api")
- , pt = {
- name: "Register",
- data: function() {
- return {
- email: "",
- password: "",
- password2: "",
- name: "",
- error: "",
- token: "",
- hasNotError: !0,
- isPoliticyActive: !1
- }
- },
- components: {},
- methods: {
- register: function() {
- var t = this;
- this.hasNotError && C.a.post("".concat(dt, "/users/create.php"), {
- email: "".concat(this.email),
- password: "".concat(this.password),
- name: "".concat(this.name)
- }).then(function(e) {
- t.hasNotError = !0,
- console.log(e),
- t.$router.push("/login")
- }).catch(function(e) {
- t.hasNotError = !1,
- t.error = "Podany adres email jest już zajęty."
- })
- },
- closePoliticy: function() {
- this.isPoliticyActive = !1
- },
- showPoliticy: function() {
- this.isPoliticyActive = !0
- },
- handleInput: function() {
- /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this.email) ? /[a-z]/.test(this.password) ? /[A-Z]/.test(this.password) ? /\d/.test(this.password) ? /[^a-zA-Z\d]/.test(this.password) ? this.password.length < 8 ? (this.error = "Hasło jest za krótkie.",
- this.hasNotError = !1) : this.password2 != this.password ? (this.error = "Hasła nie są identyczne",
- this.hasNotError = !1) : 0 === this.name.length ? (this.error = "Nazwa kontaktowa nie może pozostać pusta",
- this.hasNotError = !1) : this.hasNotError = !0 : (this.error = "Hasło nie zawiera znaków specjalnych.",
- this.hasNotError = !1) : (this.error = "Hasło nie zawiera liczb.",
- this.hasNotError = !1) : (this.error = "Hasło nie zawiera wielkich liter.",
- this.hasNotError = !1) : (this.error = "Hasło nie zawiera małych liter.",
- this.hasNotError = !1) : (this.error = "Podaj poprawny adres email.",
- this.hasNotError = !1)
- },
- mounted: function() {}
- }
- }
- , ht = pt
- , mt = (s("f975"),
- Object(p["a"])(ht, lt, ut, !1, null, "6a57d69c", null))
- , vt = mt.exports
- , ft = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper container is-fluid"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v("Dodaj ogłoszenie")]), s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control has-text-centered"
- }, [s("form", [s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.title,
- expression: "title"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text",
- placeholder: "tytuł ogłoszenia"
- },
- domProps: {
- value: t.title
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.title = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("textarea", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.description,
- expression: "description"
- }],
- staticClass: "textarea is-primary",
- attrs: {
- cols: "30",
- rows: "10",
- placeholder: "Opis ogłoszenia"
- },
- domProps: {
- value: t.description
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.description = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.signature,
- expression: "signature"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text",
- placeholder: "podpis ogłoszenia np. Jan kowalski FirmaABC sp. z.o.o."
- },
- domProps: {
- value: t.signature
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.signature = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("a", {
- staticClass: "button is-primary",
- on: {
- click: t.add
- }
- }, [t._v("Dodaj ogłoszenie")])]), s("br"), s("div", {
- staticClass: "notification",
- class: {
- "is-invisible": this.start,
- "is-danger": !this.hasNotError,
- "is-success": this.hasNotError
- }
- }, [s("p", [t._v(t._s(this.error))])])])])])])])
- }
- , gt = []
- , _t = "https://praca.zse.krakow.pl/api"
- , bt = {
- name: "AddAdvertisement",
- created: function() {
- "" == this.$store.getters.token && this.$router.push("/")
- },
- data: function() {
- return {
- title: "",
- description: "",
- signature: "",
- hasNotError: !0,
- error: "",
- start: !0
- }
- },
- components: {},
- methods: {
- add: function() {
- var t = this;
- this.start = !1,
- 0 === this.title.length ? (this.hasNotError = !1,
- this.error = "Podaj tytuł ogłoszenia") : 0 === this.description.length ? (this.hasNotError = !1,
- this.error = "Podaj opis ogłoszenia") : 0 === this.signature.length ? (this.hasNotError = !1,
- this.error = "Podaj podpis ogłoszenia") : (this.start = !0,
- this.hasNotError = !0),
- this.hasNotError && C.a.post("".concat(_t, "/advertisements/create.php"), {
- title: "".concat(this.title),
- description: "".concat(this.description),
- signature: "".concat(this.signature),
- token: this.$store.getters.token
- }).then(function(e) {
- t.hasNotError = !0,
- t.start = !1,
- t.error = "Ogłoszenie zostało dodane i czeka na zatwierdzenie przez administratora."
- }).catch(function(e) {
- t.hasNotError = !1,
- t.error = "Nie mogliśmy przetworzyć twojego ogłoszenia upewnij się, że wprowadzone dane są poprawne."
- })
- },
- handleInput: function() {
- this.start = !1,
- 0 === this.title.length ? (this.hasNotError = !1,
- this.error = "Podaj tytuł ogłoszenia") : 0 === this.description.length ? (this.hasNotError = !1,
- this.error = "Podaj opis ogłoszenia") : 0 === this.signature.length ? (this.hasNotError = !1,
- this.error = "Podaj podpis ogłoszenia") : (this.hasNotError = !0,
- this.start = !0)
- }
- }
- }
- , wt = bt
- , kt = (s("41a3"),
- Object(p["a"])(wt, ft, gt, !1, null, "746fc298", null))
- , yt = kt.exports
- , Ct = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper container is-fluid"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v("Edytuj ogłoszenie")]), s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control has-text-centered"
- }, [s("form", [s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.title,
- expression: "title"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text"
- },
- domProps: {
- value: t.title
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.title = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("textarea", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.description,
- expression: "description"
- }],
- staticClass: "textarea is-primary",
- attrs: {
- cols: "30",
- rows: "10"
- },
- domProps: {
- value: t.description
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.description = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.signature,
- expression: "signature"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text"
- },
- domProps: {
- value: t.signature
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.signature = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("a", {
- staticClass: "button is-primary",
- on: {
- click: t.save
- }
- }, [t._v("Zapisz ogłoszenie")])]), s("br"), s("div", {
- staticClass: "notification",
- class: {
- "is-invisible": this.start,
- "is-danger": !this.hasNotError,
- "is-success": this.hasNotError
- }
- }, [s("p", [t._v(t._s(this.error))])])])])])])])
- }
- , zt = []
- , jt = "https://praca.zse.krakow.pl/api"
- , $t = {
- name: "EditAdvertisement",
- created: function() {
- var t = this;
- "" == this.$store.getters.token ? this.$router.push("/") : (C.a.post("".concat(jt, "/auth/check.php"), {
- token: this.$store.getters.token
- }).then(function(e) {
- t.user_id = e.data.user_id
- }).catch(function(e) {
- console.log(e),
- t.$router.push("/")
- }),
- C.a.get("".concat(jt, "/advertisements/read_one.php?id=").concat(this.$route.query.id)).then(function(e) {
- console.log(e),
- e.data.creator_id == t.user_id ? (t.id = e.data.id,
- t.title = e.data.title,
- t.description = e.data.description,
- t.signature = e.data.signature) : (console.log("nice try"),
- t.$router.push("/"))
- }).catch(function(e) {
- console.log(e),
- t.$router.push("/")
- }))
- },
- data: function() {
- return {
- title: "",
- description: "",
- signature: "",
- hasNotError: !0,
- error: "",
- start: !0,
- user_id: "",
- id: ""
- }
- },
- components: {},
- methods: {
- save: function() {
- var t = this;
- this.start = !1,
- 0 === this.title.length ? (this.hasNotError = !1,
- this.error = "Podaj tytuł ogłoszenia") : 0 === this.description.length ? (this.hasNotError = !1,
- this.error = "Podaj opis ogłoszenia") : 0 === this.signature.length ? (this.hasNotError = !1,
- this.error = "Podaj podpis ogłoszenia") : (this.start = !0,
- this.hasNotError = !0),
- this.hasNotError && C.a.post("".concat(jt, "/advertisements/update.php"), {
- id: this.id,
- title: this.title,
- description: this.description,
- signature: this.signature,
- token: this.$store.getters.token
- }).then(function(e) {
- t.hasNotError = !0,
- t.start = !1,
- t.error = "Ogłoszenie zostało zapisane."
- }).catch(function(e) {
- t.hasNotError = !1,
- t.error = "Nie mogliśmy przetworzyć twojego ogłoszenia."
- })
- },
- handleInput: function() {
- this.start = !1,
- 0 === this.title.length ? (this.hasNotError = !1,
- this.error = "Podaj tytuł ogłoszenia") : 0 === this.description.length ? (this.hasNotError = !1,
- this.error = "Podaj opis ogłoszenia") : 0 === this.signature.length ? (this.hasNotError = !1,
- this.error = "Podaj podpis ogłoszenia") : (this.hasNotError = !0,
- this.start = !0)
- }
- }
- }
- , Et = $t
- , Nt = (s("10fe"),
- Object(p["a"])(Et, Ct, zt, !1, null, "fbbfdc82", null))
- , xt = Nt.exports
- , Pt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v(t._s(t.results.name))]), s("p", [s("strong", [t._v("Nazwa kontaktowa:")]), t._v("\n " + t._s(t.results.name) + "\n ")]), s("p", [s("strong", [t._v("Opis:")]), t._v("\n " + t._s(t.results.description) + "\n ")]), s("p", [s("strong", [t._v("Reputacja:")]), t._v("\n " + t._s(t.results.rep) + "\n ")]), s("p", [s("strong", [t._v("Adres email:")]), t._v("\n " + t._s(t.results.email) + "\n ")]), "" != this.$store.getters.token ? s("p", [s("a", {
- staticClass: "button is-link",
- attrs: {
- disabled: !t.isAddRepoButtonActive
- },
- on: {
- click: t.change_rep
- }
- }, [t._v("Dodaj reputacje")])]) : t._e()])]), t.owned_by_user ? s("span", {
- staticClass: "edit",
- attrs: {
- title: "edytuj profil"
- },
- on: {
- click: t.redirect
- }
- }, [t._m(0)]) : t._e()])
- }
- , At = [function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("p", [s("i", {
- staticClass: "far fa-edit"
- })])
- }
- ]
- , Ot = "https://praca.zse.krakow.pl/api"
- , It = {
- name: "Profile",
- data: function() {
- return {
- results: [],
- owned_by_user: !1,
- isAddRepoButtonActive: !1
- }
- },
- components: {},
- methods: {
- redirect: function() {
- this.$router.push("/profile/edit?id=".concat(this.$route.query.id))
- },
- change_rep: function() {
- var t = this;
- C.a.post("".concat(Ot, "/users/change_rep.php?id=").concat(this.$route.query.id), {
- token: this.$store.getters.token
- }).then(function(e) {
- C.a.get("".concat(Ot, "/users/read.php?id=").concat(t.$route.query.id)).then(function(e) {
- t.results = e.data
- }).catch(function(e) {
- t.$router.push("/")
- })
- }).catch(function(e) {
- C.a.get("".concat(Ot, "/users/read.php?id=").concat(t.$route.query.id)).then(function(e) {
- t.results = e.data
- }).catch(function(e) {
- t.$router.push("/")
- })
- }).then(function() {
- C.a.post("".concat(Ot, "/users/check_rep.php?id=").concat(t.$route.query.id), {
- token: t.$store.getters.token
- }).then(function(e) {
- t.isAddRepoButtonActive = !1
- }).catch(function(e) {
- t.isAddRepoButtonActive = !0
- })
- })
- }
- },
- mounted: function() {
- var t = this;
- null != this.$route.query.id ? (C.a.get("".concat(Ot, "/users/read.php?id=").concat(this.$route.query.id)).then(function(e) {
- t.results = e.data,
- t.$store.getters.id == t.results.id && (t.owned_by_user = !0)
- }).catch(function(e) {
- t.$router.push("/")
- }),
- C.a.post("".concat(Ot, "/users/check_rep.php?id=").concat(this.$route.query.id), {
- token: this.$store.getters.token
- }).then(function(e) {
- t.isAddRepoButtonActive = !1
- }).catch(function(e) {
- t.isAddRepoButtonActive = !0
- })) : his.$router.push("/")
- },
- created: function() {}
- }
- , Lt = It
- , qt = (s("937e"),
- Object(p["a"])(Lt, Pt, At, !1, null, "7400bf91", null))
- , St = qt.exports
- , Bt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper container is-fluid"
- }, [s("div", {
- staticClass: "box box-wrapper"
- }, [s("div", {
- staticClass: "content"
- }, [s("h2", [t._v("Edytuj profil")]), s("div", {
- staticClass: "field"
- }, [s("div", {
- staticClass: "control has-text-centered"
- }, [s("form", [s("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.name,
- expression: "name"
- }],
- staticClass: "input is-primary",
- attrs: {
- type: "text"
- },
- domProps: {
- value: t.name
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.name = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("textarea", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.description,
- expression: "description"
- }],
- staticClass: "textarea is-primary",
- attrs: {
- cols: "30",
- rows: "10"
- },
- domProps: {
- value: t.description
- },
- on: {
- input: [function(e) {
- e.target.composing || (t.description = e.target.value)
- }
- , t.handleInput]
- }
- }), s("br"), s("br"), s("br"), s("a", {
- staticClass: "button is-primary",
- on: {
- click: t.save
- }
- }, [t._v("Zapisz Profil")])]), s("br"), s("div", {
- staticClass: "notification",
- class: {
- "is-invisible": this.start,
- "is-danger": !this.hasNotError,
- "is-success": this.hasNotError
- }
- }, [s("p", [t._v(t._s(this.error))])])])])])])])
- }
- , Zt = []
- , Rt = "https://praca.zse.krakow.pl/api"
- , Vt = {
- name: "EditProfile",
- mounted: function() {
- var t = this;
- "" == this.$store.getters.token ? this.$router.push("/") : C.a.get("".concat(Rt, "/users/read.php?id=").concat(this.$route.query.id)).then(function(e) {
- t.results = e.data,
- t.$store.getters.id == t.results.id ? (t.owned_by_user = !0,
- t.name = t.results.name,
- t.description = t.results.description,
- t.id = t.results.id) : t.$router.push("/")
- }).catch(function(e) {
- t.$router.push("/")
- })
- },
- data: function() {
- return {
- name: "",
- description: "",
- id: "",
- hasNotError: !0,
- error: "",
- start: !0,
- owned_by_user: !1
- }
- },
- components: {},
- methods: {
- save: function() {
- var t = this;
- this.start = !1,
- 0 === this.name.length ? (this.hasNotError = !1,
- this.error = "Podaj nazwe kontaktową") : (this.start = !0,
- this.hasNotError = !0),
- this.hasNotError && C.a.post("".concat(Rt, "/users/update.php"), {
- id: this.id,
- name: this.name,
- description: this.description,
- token: this.$store.getters.token
- }).then(function(e) {
- t.hasNotError = !0,
- t.start = !1,
- t.error = "Profil został zapisany."
- }).catch(function(e) {
- t.hasNotError = !1,
- t.error = "Nie mogliśmy przetworzyć twojego profilu."
- })
- },
- handleInput: function() {
- this.start = !1,
- 0 === this.name.length ? (this.hasNotError = !1,
- this.error = "Podaj Nazwe kontaktową") : (this.start = !0,
- this.hasNotError = !0)
- }
- }
- }
- , Ut = Vt
- , Dt = (s("0f42"),
- Object(p["a"])(Ut, Bt, Zt, !1, null, "88fa5708", null))
- , Ht = Dt.exports
- , Wt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper"
- }, [s("div", {
- staticClass: "container"
- }, [s("h2", {
- staticClass: "title"
- }, [t._v("Witaj w panelu Administratora")]), s("div", {
- staticClass: "box"
- }, [s("div", {
- staticClass: "columns"
- }, [s("div", {
- staticClass: "column"
- }, [s("h3", {
- staticClass: "title is-4"
- }, [t._v("Użytkownicy:")]), s("div", {
- staticClass: "media"
- }, [s("div", {
- staticClass: "media-content"
- }, t._l(t.users, function(e) {
- return s("div", {
- key: e.id,
- staticClass: "box"
- }, [s("router-link", {
- attrs: {
- to: {
- path: "profile",
- query: {
- id: e.id
- }
- }
- }
- }, [s("a", {
- staticClass: "title is-5"
- }, [t._v(t._s(e.name))])]), s("br"), s("a", {
- staticClass: "button is-danger",
- on: {
- click: function(s) {
- return t.delete_user(e.id)
- }
- }
- }, [t._v("Usuń")])], 1)
- }), 0)])]), s("div", {
- staticClass: "column"
- }, [s("h3", {
- staticClass: "title is-4"
- }, [t._v("Ogłoszenia:")]), s("div", {
- staticClass: "media"
- }, [s("div", {
- staticClass: "media-content"
- }, t._l(t.advertisements, function(e) {
- return s("div", {
- key: e.id,
- staticClass: "box"
- }, [s("router-link", {
- attrs: {
- to: {
- path: "advertisement",
- query: {
- id: e.id
- }
- }
- }
- }, [s("a", {
- staticClass: "title is-5"
- }, [t._v(t._s(e.title))])]), s("br"), 0 == e.accepted ? s("a", {
- staticClass: "button is-success",
- on: {
- click: function(s) {
- return t.accept_advertisement(e.id)
- }
- }
- }, [t._v("Akceptuj")]) : t._e(), s("a", {
- staticClass: "button is-danger",
- on: {
- click: function(s) {
- return t.delete_advertisement(e.id)
- }
- }
- }, [t._v("Usuń")])], 1)
- }), 0)])])])])])])
- }
- , Tt = []
- , Mt = "https://praca.zse.krakow.pl/api"
- , Ft = {
- name: "Admin",
- data: function() {
- return {
- users: [],
- advertisements: []
- }
- },
- methods: {
- delete_user: function(t) {
- var e = this;
- C.a.post("".concat(Mt, "/users/delete.php"), {
- id: "".concat(t),
- token: this.$store.getters.token
- }).then(function(t) {
- C.a.get("".concat(Mt, "/users/read_all.php")).then(function(t) {
- e.users = t.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }).catch(function(t) {
- console.log(t)
- })
- },
- delete_advertisement: function(t) {
- var e = this;
- C.a.post("".concat(Mt, "/advertisements/delete.php"), {
- id: "".concat(t),
- token: this.$store.getters.token
- }).then(function(t) {
- C.a.post("".concat(Mt, "/advertisements/read_admin.php"), {
- token: e.$store.getters.token
- }).then(function(t) {
- e.advertisements = t.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }).catch(function(t) {
- console.log(t)
- })
- },
- accept_advertisement: function(t) {
- var e = this;
- C.a.post("".concat(Mt, "/advertisements/accept.php"), {
- id: "".concat(t),
- token: this.$store.getters.token,
- accepted: 1
- }).then(function(t) {
- C.a.post("".concat(Mt, "/advertisements/read_admin.php"), {
- token: e.$store.getters.token
- }).then(function(t) {
- e.advertisements = t.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }).catch(function(t) {
- console.log(t)
- })
- }
- },
- mounted: function() {
- var t = this;
- "" != this.$store.getters.token && "2" == this.$store.getters.accesLvl || (console.log("al = ".concat(this.$store.getters.accesLvl)),
- this.$router.push("/")),
- C.a.post("".concat(Mt, "/advertisements/read_admin.php"), {
- token: this.$store.getters.token
- }).then(function(e) {
- console.log(e.data.records),
- t.advertisements = e.data.records
- }).catch(function(t) {
- console.log(t)
- }),
- C.a.get("".concat(Mt, "/users/read_all.php")).then(function(e) {
- console.log(e.data.records),
- t.users = e.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }
- }
- , Jt = Ft
- , Kt = (s("cd3e"),
- Object(p["a"])(Jt, Wt, Tt, !1, null, "2ee59a56", null))
- , Gt = Kt.exports
- , Qt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "wrapper"
- }, [s("searchInput", {
- on: {
- input: t.handleInput
- },
- model: {
- value: t.searchValue,
- callback: function(e) {
- t.searchValue = e
- },
- expression: "searchValue"
- }
- }), s("UsersList", {
- attrs: {
- results: t.results
- }
- })], 1)
- }
- , Xt = []
- , Yt = function() {
- var t = this
- , e = t.$createElement
- , s = t._self._c || e;
- return s("div", {
- staticClass: "usersWrapper"
- }, t._l(t.results, function(e) {
- return s("div", {
- key: e.id,
- staticClass: "box"
- }, [s("router-link", {
- attrs: {
- to: {
- path: "profile",
- query: {
- id: e.id
- }
- }
- }
- }, [s("article", {
- staticClass: "media"
- }, [s("div", {
- staticClass: "media-left"
- }, [s("figure", {
- staticClass: "image is-64x64"
- }, [t._v("\n " + t._s(e.name.toUpperCase().substring(0, 2)) + "\n ")])]), s("div", {
- staticClass: "media-content"
- }, [s("div", {
- staticClass: "content"
- }, [s("p", [s("strong", [t._v(t._s(e.name))]), s("br"), t._v("\n " + t._s(e.description.substring(0, 30)) + "\n ")])])])])])], 1)
- }), 0)
- }
- , te = []
- , ee = {
- name: "UsersList",
- props: {
- results: {
- type: Array,
- required: !0
- }
- },
- methods: {}
- }
- , se = ee
- , re = (s("2e1c"),
- Object(p["a"])(se, Yt, te, !1, null, "50151814", null))
- , ae = re.exports
- , ie = "https://praca.zse.krakow.pl/api"
- , ne = {
- name: "SearchUser",
- data: function() {
- return {
- searchValue: "",
- results: []
- }
- },
- components: {
- SearchInput: A,
- UsersList: ae
- },
- methods: {
- handleInput: j()(function() {
- var t = this;
- C.a.get("".concat(ie, "/users/search.php?s=").concat(this.searchValue)).then(function(e) {
- console.log(e.data.records),
- t.results = e.data.records
- }).catch(function(e) {
- t.results = {
- 0: {
- title: "Niestety, nic nie znaleziono.",
- signature: "Błąd"
- }
- }
- })
- }, 500)
- },
- mounted: function() {
- var t = this;
- C.a.get("".concat(ie, "/users/read_all.php")).then(function(e) {
- console.log(e.data.records),
- t.results = e.data.records
- }).catch(function(t) {
- console.log(t)
- })
- }
- }
- , oe = ne
- , ce = (s("7714"),
- Object(p["a"])(oe, Qt, Xt, !1, null, "75ba6210", null))
- , le = ce.exports;
- r["a"].use(b["a"]);
- var ue = new b["a"]({
- routes: [{
- path: "/",
- name: "Home",
- component: J
- }, {
- path: "/advertisement",
- name: "Advertisement",
- component: et
- }, {
- path: "/login",
- name: "Login",
- component: ct
- }, {
- path: "/register",
- name: "Register",
- component: vt
- }, {
- path: "/advertisement/add",
- name: "AddAdvertisement",
- component: yt
- }, {
- path: "/advertisement/edit",
- name: "EditAdvertisement",
- component: xt
- }, {
- path: "/profile",
- name: "Profile",
- component: St
- }, {
- path: "/profile/edit",
- name: "EditProfile",
- component: Ht
- }, {
- path: "/admin",
- name: "Admin",
- component: Gt
- }, {
- path: "/users",
- name: "users",
- component: le
- }]
- });
- r["a"].use(l["a"]);
- var de = new l["a"].Store({
- state: {
- token: "",
- id: "",
- accesLvl: ""
- },
- mutations: {
- set: function(t, e) {
- t.token = e
- },
- setID: function(t, e) {
- t.id = e
- },
- setAccesLvl: function(t, e) {
- t.accesLvl = e
- }
- },
- actions: {},
- getters: {
- token: function(t) {
- return t.token
- },
- id: function(t) {
- return t.id
- },
- accesLvl: function(t) {
- return t.accesLvl
- }
- }
- })
- , pe = s("9483");
- Object(pe["a"])("".concat("", "service-worker.js"), {
- ready: function() {
- console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")
- },
- registered: function() {
- console.log("Service worker has been registered.")
- },
- cached: function() {
- console.log("Content has been cached for offline use.")
- },
- updatefound: function() {
- console.log("New content is downloading.")
- },
- updated: function() {
- console.log("New content is available; please refresh.")
- },
- offline: function() {
- console.log("No internet connection found. App is running in offline mode.")
- },
- error: function(t) {
- console.error("Error during service worker registration:", t)
- }
- });
- s("92c6");
- r["a"].config.productionTip = !1,
- new r["a"]({
- router: ue,
- store: de,
- render: function(t) {
- return t(_)
- }
- }).$mount("#app")
- },
- "5a61": function(t, e, s) {},
- "661f": function(t, e, s) {},
- 7714: function(t, e, s) {
- "use strict";
- var r = s("89e4")
- , a = s.n(r);
- a.a
- },
- 7852: function(t, e, s) {},
- "7cb8": function(t, e, s) {},
- "7ccc": function(t, e, s) {},
- "89e4": function(t, e, s) {},
- "913f": function(t, e, s) {
- "use strict";
- var r = s("07a3")
- , a = s.n(r);
- a.a
- },
- "934c": function(t, e, s) {},
- "937e": function(t, e, s) {
- "use strict";
- var r = s("1dd1")
- , a = s.n(r);
- a.a
- },
- a824: function(t, e, s) {
- "use strict";
- var r = s("7cb8")
- , a = s.n(r);
- a.a
- },
- b28f: function(t, e, s) {
- "use strict";
- var r = s("009b")
- , a = s.n(r);
- a.a
- },
- cd3e: function(t, e, s) {
- "use strict";
- var r = s("d506")
- , a = s.n(r);
- a.a
- },
- cf05: function(t, e, s) {
- t.exports = s.p + "img/logo.c903d1df.png"
- },
- d506: function(t, e, s) {},
- dc76: function(t, e, s) {
- "use strict";
- var r = s("661f")
- , a = s.n(r);
- a.a
- },
- dcef: function(t, e, s) {
- "use strict";
- var r = s("1b77")
- , a = s.n(r);
- a.a
- },
- e13a: function(t, e, s) {},
- ea15: function(t, e, s) {
- "use strict";
- var r = s("934c")
- , a = s.n(r);
- a.a
- },
- ebf5: function(t, e, s) {
- "use strict";
- var r = s("e13a")
- , a = s.n(r);
- a.a
- },
- f975: function(t, e, s) {
- "use strict";
- var r = s("42f0")
- , a = s.n(r);
- a.a
- }
- });
- //# sourceMappingURL=app.eb690666.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement