@ozdao/prometheus-framework 0.2.138 → 0.2.140
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +30 -15
- package/dist/auth.server.mjs +30 -15
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/events.server.js +3 -3
- package/dist/events.server.mjs +3 -3
- package/dist/files.server.js +3 -3
- package/dist/files.server.mjs +3 -3
- package/dist/gallery.server.js +4 -4
- package/dist/gallery.server.mjs +4 -4
- package/dist/index-DNI4aUP2.js +259 -0
- package/dist/index-Tcyehi73.mjs +260 -0
- package/dist/orders.server.js +9 -8
- package/dist/orders.server.mjs +9 -8
- package/dist/organizations.server.js +31 -15
- package/dist/organizations.server.mjs +31 -15
- package/dist/products.server.js +37 -5
- package/dist/products.server.mjs +37 -5
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +19 -19
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +32 -31
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -47
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +42 -39
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +121 -112
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +17 -16
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +121 -61
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +25 -24
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +66 -67
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +78 -74
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/dist/reports.server.js +0 -3
- package/dist/reports.server.mjs +0 -3
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +5 -5
- package/dist/wallet.server.mjs +8 -8
- package/package.json +1 -1
- package/src/components/Completion/Completion.vue +29 -30
- package/src/modules/auth/components/pages/Invite.vue +4 -2
- package/src/modules/auth/controllers/auth.controller.js +31 -13
- package/src/modules/auth/middlewares/authJwt.js +80 -0
- package/src/modules/{middlewares/server → auth/middlewares}/index.js +1 -3
- package/src/modules/{middlewares/server → auth/middlewares}/verifyAccesses.js +1 -1
- package/src/modules/auth/routes/auth.routes.js +2 -2
- package/src/modules/auth/routes/twofa.routes.js +1 -1
- package/src/modules/auth/store/auth.js +9 -0
- package/src/modules/chats/routes/chats.routes.js +1 -1
- package/src/modules/community/routes/blog.routes.js +2 -2
- package/src/modules/events/routes/events.routes.js +2 -2
- package/src/modules/files/routes/files.routes.js +2 -2
- package/src/modules/gallery/components/pages/Gallery.vue +1 -1
- package/src/modules/gallery/routes/gallery.routes.js +4 -5
- package/src/modules/globals/services/globals.crud.js +2 -2
- package/src/modules/marketplace/store/marketplace.js +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +1 -2
- package/src/modules/orders/routes/applications.routes.js +2 -2
- package/src/modules/orders/routes/orders.routes.js +2 -2
- package/src/modules/organizations/components/blocks/CardOrganization.vue +9 -7
- package/src/modules/organizations/components/pages/Members.vue +26 -15
- package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +101 -43
- package/src/modules/organizations/controllers/invites.controller.js +18 -13
- package/src/modules/organizations/controllers/memberships.controller.js +16 -9
- package/src/modules/organizations/controllers/organizations.controller.js +3 -4
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +4 -0
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/invites.js +2 -1
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/products/middlewares/index.js +11 -0
- package/src/modules/products/routes/categories.routes.js +2 -2
- package/src/modules/reports/routes/reports.routes.js +2 -2
- package/src/modules/spots/components/layouts/Spots.vue +2 -2
- package/src/modules/spots/components/pages/Map.vue +79 -78
- package/src/modules/users/components/pages/ProfileEdit.vue +37 -22
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +2 -2
- package/src/modules/middlewares/server/authJwt.js +0 -68
- /package/src/modules/{middlewares/server → auth/middlewares}/authSecret.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyInvites.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifySignUp.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyUser.js +0 -0
- /package/src/modules/globals/services/{globals.cashe.js → globals.cache.js} +0 -0
- /package/src/modules/{middlewares/server → products/middlewares}/verifyCategory.js +0 -0
package/dist/products.server.js
CHANGED
@@ -6,7 +6,6 @@ require("uuid");
|
|
6
6
|
const require$$0 = require("mongoose");
|
7
7
|
require("path");
|
8
8
|
const require$$3 = require("openai");
|
9
|
-
const index = require("./index-CDbtWkBj.js");
|
10
9
|
const queryProcessor = require("./queryProcessor-iewDZq_f.js");
|
11
10
|
var product_model = (mongoose) => {
|
12
11
|
const ProductSchema = new mongoose.Schema({
|
@@ -803,11 +802,44 @@ const controllerFactory$3 = (db) => {
|
|
803
802
|
};
|
804
803
|
};
|
805
804
|
var categories_controller = controllerFactory$3;
|
805
|
+
var verifyCategory;
|
806
|
+
var hasRequiredVerifyCategory;
|
807
|
+
function requireVerifyCategory() {
|
808
|
+
if (hasRequiredVerifyCategory) return verifyCategory;
|
809
|
+
hasRequiredVerifyCategory = 1;
|
810
|
+
const middlewareFactory = (db) => {
|
811
|
+
const Category = db.category;
|
812
|
+
const checkCategoryExistOrNot = async (req, res, next) => {
|
813
|
+
try {
|
814
|
+
const category = await Category.findOne({ url: req.body.url });
|
815
|
+
if (category) {
|
816
|
+
res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
|
817
|
+
return;
|
818
|
+
}
|
819
|
+
next();
|
820
|
+
} catch (err) {
|
821
|
+
res.status(500).send({ message: err });
|
822
|
+
}
|
823
|
+
};
|
824
|
+
return {
|
825
|
+
checkCategoryExistOrNot
|
826
|
+
};
|
827
|
+
};
|
828
|
+
verifyCategory = middlewareFactory;
|
829
|
+
return verifyCategory;
|
830
|
+
}
|
831
|
+
const middlewareIndexFactory = (db) => {
|
832
|
+
const verifyCategory2 = requireVerifyCategory()(db);
|
833
|
+
return {
|
834
|
+
verifyCategory: verifyCategory2
|
835
|
+
};
|
836
|
+
};
|
837
|
+
var middlewares = middlewareIndexFactory;
|
806
838
|
const controllerFactory$2 = categories_controller;
|
807
|
-
const
|
839
|
+
const middlewareFactoryProducts = middlewares;
|
808
840
|
var categories_routes = function(app, db) {
|
809
841
|
const controller = controllerFactory$2(db);
|
810
|
-
const { verifyCategory } =
|
842
|
+
const { verifyCategory: verifyCategory2 } = middlewareFactoryProducts(db);
|
811
843
|
app.get(
|
812
844
|
"/categories",
|
813
845
|
controller.getCategories
|
@@ -823,7 +855,7 @@ var categories_routes = function(app, db) {
|
|
823
855
|
app.post(
|
824
856
|
"/categories/add",
|
825
857
|
[
|
826
|
-
|
858
|
+
verifyCategory2.checkCategoryExistOrNot
|
827
859
|
],
|
828
860
|
controller.addCategory
|
829
861
|
);
|
@@ -883,7 +915,7 @@ const controllerFactory$1 = (db) => {
|
|
883
915
|
)
|
884
916
|
];
|
885
917
|
const leftoveres = await Leftover.aggregate(stages).exec();
|
886
|
-
if (!leftoveres
|
918
|
+
if (!leftoveres) {
|
887
919
|
return res.status(404).send({ message: "LEFTOVERES_NOT_FOUND" });
|
888
920
|
}
|
889
921
|
res.status(200).send(leftoveres);
|
package/dist/products.server.mjs
CHANGED
@@ -4,7 +4,6 @@ import "uuid";
|
|
4
4
|
import require$$0 from "mongoose";
|
5
5
|
import "path";
|
6
6
|
import require$$3 from "openai";
|
7
|
-
import { s as server } from "./index-C-8xOJnM.mjs";
|
8
7
|
import { q as queryProcessor } from "./queryProcessor-DQSFR9YA.mjs";
|
9
8
|
var product_model = (mongoose) => {
|
10
9
|
const ProductSchema = new mongoose.Schema({
|
@@ -801,11 +800,44 @@ const controllerFactory$3 = (db) => {
|
|
801
800
|
};
|
802
801
|
};
|
803
802
|
var categories_controller = controllerFactory$3;
|
803
|
+
var verifyCategory;
|
804
|
+
var hasRequiredVerifyCategory;
|
805
|
+
function requireVerifyCategory() {
|
806
|
+
if (hasRequiredVerifyCategory) return verifyCategory;
|
807
|
+
hasRequiredVerifyCategory = 1;
|
808
|
+
const middlewareFactory = (db) => {
|
809
|
+
const Category = db.category;
|
810
|
+
const checkCategoryExistOrNot = async (req, res, next) => {
|
811
|
+
try {
|
812
|
+
const category = await Category.findOne({ url: req.body.url });
|
813
|
+
if (category) {
|
814
|
+
res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
|
815
|
+
return;
|
816
|
+
}
|
817
|
+
next();
|
818
|
+
} catch (err) {
|
819
|
+
res.status(500).send({ message: err });
|
820
|
+
}
|
821
|
+
};
|
822
|
+
return {
|
823
|
+
checkCategoryExistOrNot
|
824
|
+
};
|
825
|
+
};
|
826
|
+
verifyCategory = middlewareFactory;
|
827
|
+
return verifyCategory;
|
828
|
+
}
|
829
|
+
const middlewareIndexFactory = (db) => {
|
830
|
+
const verifyCategory2 = requireVerifyCategory()(db);
|
831
|
+
return {
|
832
|
+
verifyCategory: verifyCategory2
|
833
|
+
};
|
834
|
+
};
|
835
|
+
var middlewares = middlewareIndexFactory;
|
804
836
|
const controllerFactory$2 = categories_controller;
|
805
|
-
const
|
837
|
+
const middlewareFactoryProducts = middlewares;
|
806
838
|
var categories_routes = function(app, db) {
|
807
839
|
const controller = controllerFactory$2(db);
|
808
|
-
const { verifyCategory } =
|
840
|
+
const { verifyCategory: verifyCategory2 } = middlewareFactoryProducts(db);
|
809
841
|
app.get(
|
810
842
|
"/categories",
|
811
843
|
controller.getCategories
|
@@ -821,7 +853,7 @@ var categories_routes = function(app, db) {
|
|
821
853
|
app.post(
|
822
854
|
"/categories/add",
|
823
855
|
[
|
824
|
-
|
856
|
+
verifyCategory2.checkCategoryExistOrNot
|
825
857
|
],
|
826
858
|
controller.addCategory
|
827
859
|
);
|
@@ -881,7 +913,7 @@ const controllerFactory$1 = (db) => {
|
|
881
913
|
)
|
882
914
|
];
|
883
915
|
const leftoveres = await Leftover.aggregate(stages).exec();
|
884
|
-
if (!leftoveres
|
916
|
+
if (!leftoveres) {
|
885
917
|
return res.status(404).send({ message: "LEFTOVERES_NOT_FOUND" });
|
886
918
|
}
|
887
919
|
res.status(200).send(leftoveres);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d={class:"w-100 radius-big pd-medium bg-second t-black"},m={class:"mn-b-thin flex-v-center flex-nowrap flex"},g={class:"mn-l-thin uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"},p={class:"w-100 h-2r pos-relative pd-nano bg-black radius-big"},h={__name:"Completion",props:{user:Object,target:Object,cta:Boolean,percentage:Number,text:String,text_cta:String},setup(
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d={class:"w-100 radius-big pd-medium bg-second t-black"},m={class:"mn-b-thin flex-v-center flex-nowrap flex"},g={class:"mn-l-thin uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"},p={class:"w-100 h-2r pos-relative pd-nano bg-black radius-big"},h={__name:"Completion",props:{user:Object,target:Object,cta:Boolean,percentage:Number,text:String,text_cta:String},setup(r){const{user:b,cta:f,target:l}=r,u=o=>{let a=0,i=0;function s(t){for(let n in t)t.hasOwnProperty(n)&&(t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?s(t[n]):(a++,t[n]!=null&&t[n]!==""&&i++))}return s(o),a===0?0:Math.round(i/a*100)},c=e.computed(()=>l?u(l):0);return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",d,[e.createElementVNode("div",m,[e.createElementVNode("h3",null,e.toDisplayString(r.text),1),e.createElementVNode("h4",g,e.toDisplayString(r.percentage||c.value)+"% ",1),r.cta?(e.openBlock(),e.createBlock(i,{key:0,to:{name:"User Edit Profile",params:{_id:r.user}},class:"mn-l-auto uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.text_cta),1)]),_:1},8,["to"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",p,[e.createElementVNode("div",{style:e.normalizeStyle(`width: ${c.value}%`),class:"h-100 bg-second mn-b-thin radius-big"},null,4)])])}}};exports.default=h;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
const w = { class: "w-100 radius-big pd-medium bg-second t-black" },
|
1
|
+
import { computed as h, resolveComponent as p, openBlock as d, createElementBlock as g, createElementVNode as a, toDisplayString as c, createBlock as f, withCtx as b, createTextVNode as x, createCommentVNode as k, normalizeStyle as _ } from "vue";
|
2
|
+
const w = { class: "w-100 radius-big pd-medium bg-second t-black" }, y = { class: "mn-b-thin flex-v-center flex-nowrap flex" }, v = { class: "mn-l-thin uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin" }, C = { class: "w-100 h-2r pos-relative pd-nano bg-black radius-big" }, S = {
|
3
3
|
__name: "Completion",
|
4
4
|
props: {
|
5
5
|
user: Object,
|
@@ -9,38 +9,38 @@ const w = { class: "w-100 radius-big pd-medium bg-second t-black" }, v = { class
|
|
9
9
|
text: String,
|
10
10
|
text_cta: String
|
11
11
|
},
|
12
|
-
setup(
|
13
|
-
const { user: P, cta: B, target:
|
14
|
-
let
|
12
|
+
setup(n) {
|
13
|
+
const { user: P, cta: B, target: l } = n, m = (o) => {
|
14
|
+
let r = 0, i = 0;
|
15
15
|
function u(e) {
|
16
16
|
for (let t in e)
|
17
|
-
e.hasOwnProperty(t) && (e[t] && typeof e[t] == "object" && !Array.isArray(e[t]) ? u(e[t]) : (
|
17
|
+
e.hasOwnProperty(t) && (e[t] && typeof e[t] == "object" && !Array.isArray(e[t]) ? u(e[t]) : (r++, e[t] != null && e[t] !== "" && i++));
|
18
18
|
}
|
19
|
-
return u(o),
|
20
|
-
};
|
21
|
-
return
|
22
|
-
const
|
19
|
+
return u(o), r === 0 ? 0 : Math.round(i / r * 100);
|
20
|
+
}, s = h(() => l ? m(l) : 0);
|
21
|
+
return (o, r) => {
|
22
|
+
const i = p("router-link");
|
23
23
|
return d(), g("section", w, [
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
a("div", y, [
|
25
|
+
a("h3", null, c(n.text), 1),
|
26
|
+
a("h4", v, c(n.percentage || s.value) + "% ", 1),
|
27
|
+
n.cta ? (d(), f(i, {
|
28
28
|
key: 0,
|
29
29
|
to: {
|
30
30
|
name: "User Edit Profile",
|
31
|
-
params: { _id:
|
31
|
+
params: { _id: n.user }
|
32
32
|
},
|
33
33
|
class: "mn-l-auto uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"
|
34
34
|
}, {
|
35
35
|
default: b(() => [
|
36
|
-
x(
|
36
|
+
x(c(n.text_cta), 1)
|
37
37
|
]),
|
38
38
|
_: 1
|
39
39
|
}, 8, ["to"])) : k("", !0)
|
40
40
|
]),
|
41
|
-
|
42
|
-
|
43
|
-
style: _(`width: ${
|
41
|
+
a("div", C, [
|
42
|
+
a("div", {
|
43
|
+
style: _(`width: ${s.value}%`),
|
44
44
|
class: "h-100 bg-second mn-b-thin radius-big"
|
45
45
|
}, null, 4)
|
46
46
|
])
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
|
@@ -2,7 +2,7 @@ import { mergeModels as N, useModel as M, ref as g, watch as $, onMounted as T,
|
|
2
2
|
import q from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
/* empty css */
|
4
4
|
import A from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import z from "../Dropdown/Dropdown.
|
5
|
+
import z from "../Dropdown/Dropdown.vue.js";
|
6
6
|
import D from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import H from "../BottomSheet/BottomSheet.vue.js";
|
8
8
|
import J from "../../modules/globals/components/blocks/BlockSearch.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.vue2.cjs"),k=require("../../modules/icons/navigation/IconArrow.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},F={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:N,locale:c}=B.useI18n();let r=e.ref(0),a=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const m=y;function b(){m("action")}function T(n){m("update:input",n),f.value=n}function g(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(a.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let n=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(a.value=a.value.slice(0,-1),a.value=n.substring(0,l)+(o.value&&l%2?"|":""),l--):(a.value=n.substring(0,l)+(o.value&&l%2?"|":""),l++),l>n.length&&t.loopTyping&&setTimeout(()=>{u=!0,a.value=n.substring(0,l)},333),l===0&&u&&(u=!1,g(),n=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(n,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(w.default,{field:e.unref(a),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(a)?a.value=u:a=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:g,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"},[e.createElementVNode("span",null,e.toDisplayString(s.action),1),e.createVNode(k.default,{class:"mn-l-thin radius-extra bg-white i-medium"})])):e.createCommentVNode("",!0)]))}};exports.default=F;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as i, onMounted as _, watchEffect as C, openBlock as b, createElementBlock as x, createVNode as T, unref as v, isRef as F, createElementVNode as N, toDisplayString as V, createCommentVNode as E } from "vue";
|
2
|
-
import A from "../Field/Field.
|
2
|
+
import A from "../Field/Field.vue2.js";
|
3
3
|
import H from "../../modules/icons/navigation/IconArrow.vue.js";
|
4
4
|
import { useI18n as j } from "vue-i18n";
|
5
5
|
const D = { class: "pd-thin radius-extra flex-nowrap flex" }, U = {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */require("vue-i18n");;/* empty css */const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const n={class:"cols-2-1_2 gap-small pd-small bg-white"},u=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",n,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey-transp-25 radius-big w-m-66r t-center"},{default:e.withCtx(({Component:l,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l),{ref:"page",key:i.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),u])}}};exports.default=s;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
|
+
/* empty css */
|
4
5
|
/* empty css */
|
5
|
-
/* empty css */
|
6
6
|
import "vue-i18n";
|
7
7
|
/* empty css */
|
8
8
|
import { useRoute as _, useRouter as f } from "vue-router";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css */const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),c=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),v=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function y(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{c.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(c.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-light radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:y,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive as P, watch as D, ref as c, openBlock as b, createElementBlock as w, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
|
2
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
3
|
import { useRoute as q, useRouter as $ } from "vue-router";
|
4
4
|
import { useI18n as K } from "vue-i18n";
|
5
5
|
import { state as N } from "../../store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as i, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import c from "../../../../components/Field/Field.
|
4
|
-
import k from "../../../../components/Button/Button.
|
3
|
+
import c from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import k from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import { useRoute as q, useRouter as v } from "vue-router";
|
6
6
|
import { useI18n as E } from "vue-i18n";
|
7
7
|
import { state as s, actions as h } from "../../store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
|
@@ -1,23 +1,24 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as u, onMounted as c, openBlock as f, createElementBlock as _, createElementVNode as s, createVNode as i, withCtx as w } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { useRoute as
|
6
|
-
import { state as e, actions as
|
7
|
-
import { actions as
|
8
|
-
import { validateInputs as
|
3
|
+
import l from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import h from "../../../../components/Button/Button.vue2.js";
|
5
|
+
import { useRoute as b, useRouter as v } from "vue-router";
|
6
|
+
import { state as e, actions as y } from "../../store/auth.js";
|
7
|
+
import { actions as g } from "../../../organizations/store/invites.js";
|
8
|
+
import { validateInputs as P, validatePassword as R } from "../../../middlewares/client/inputs.validation.js";
|
9
9
|
/* empty css */
|
10
|
-
const
|
10
|
+
const q = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "You have been invited to the organization", -1), x = /* @__PURE__ */ s("p", { class: "mn-b-semi t-transp" }, "Please provide a password to complete the registration.", -1), C = { class: "mn-b-semi radius-small o-hidden" }, E = /* @__PURE__ */ s("span", null, "Join", -1), O = {
|
11
11
|
__name: "Invite",
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
setup(U) {
|
13
|
+
const n = u(null), o = b(), d = v();
|
14
|
+
c(async () => {
|
15
|
+
await g.readOne(o.query.inviteCode);
|
16
|
+
});
|
17
|
+
async function m() {
|
17
18
|
try {
|
18
|
-
await
|
19
|
-
|
20
|
-
|
19
|
+
await P(
|
20
|
+
n,
|
21
|
+
R,
|
21
22
|
e.user.password,
|
22
23
|
"Некорректный пароль"
|
23
24
|
);
|
@@ -25,13 +26,13 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
25
26
|
throw new Error();
|
26
27
|
}
|
27
28
|
try {
|
28
|
-
await
|
29
|
+
await y.signup(e.user, o.query.type, o.query.inviteCode);
|
29
30
|
} catch (a) {
|
30
31
|
console.log(a);
|
31
32
|
}
|
32
33
|
}
|
33
|
-
function
|
34
|
-
|
34
|
+
function p() {
|
35
|
+
d.push({
|
35
36
|
name: "User Profile",
|
36
37
|
params: {
|
37
38
|
_id: e.user._id
|
@@ -41,20 +42,20 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
41
42
|
}
|
42
43
|
});
|
43
44
|
}
|
44
|
-
return (a, t) => (
|
45
|
+
return (a, t) => (f(), _("section", q, [
|
45
46
|
k,
|
46
|
-
|
47
|
-
s("div",
|
48
|
-
i(
|
47
|
+
x,
|
48
|
+
s("div", C, [
|
49
|
+
i(l, {
|
49
50
|
field: e.user.password,
|
50
51
|
"onUpdate:field": t[0] || (t[0] = (r) => e.user.password = r),
|
51
52
|
type: "password",
|
52
|
-
validation:
|
53
|
+
validation: n.value,
|
53
54
|
label: "Password",
|
54
55
|
placeholder: "******",
|
55
56
|
class: "mn-b-thin bg-light pd-medium radius-small"
|
56
57
|
}, null, 8, ["field", "validation"]),
|
57
|
-
i(
|
58
|
+
i(l, {
|
58
59
|
field: e.user.passwordRepeat,
|
59
60
|
"onUpdate:field": t[1] || (t[1] = (r) => e.user.passwordRepeat = r),
|
60
61
|
type: "password",
|
@@ -63,13 +64,13 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
63
64
|
class: "bg-light pd-medium radius-small"
|
64
65
|
}, null, 8, ["field"])
|
65
66
|
]),
|
66
|
-
i(
|
67
|
-
submit:
|
68
|
-
callback:
|
67
|
+
i(h, {
|
68
|
+
submit: m,
|
69
|
+
callback: p,
|
69
70
|
class: "w-100 bg-main mn-b-big"
|
70
71
|
}, {
|
71
|
-
default:
|
72
|
-
|
72
|
+
default: w(() => [
|
73
|
+
E
|
73
74
|
]),
|
74
75
|
_: 1
|
75
76
|
})
|
@@ -77,5 +78,5 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
77
78
|
}
|
78
79
|
};
|
79
80
|
export {
|
80
|
-
|
81
|
+
O as default
|
81
82
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
|
2
2
|
import E from "../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import I from "../../../../components/Field/Field.
|
3
|
+
import I from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import V from "../../../../components/Button/Button.
|
5
|
+
import V from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as k, useRouter as x } from "vue-router";
|
7
7
|
import { useI18n as N } from "vue-i18n";
|
8
8
|
import S from "../../localization/ResetPassword.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as l, createTextVNode as c, toDisplayString as r, unref as s, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
|
2
2
|
import q from "../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import y from "../../../../components/Field/Field.
|
3
|
+
import y from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import O from "../../../../components/Button/Button.
|
5
|
+
import O from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as $, useRouter as j } from "vue-router";
|
7
7
|
import { useI18n as A } from "vue-i18n";
|
8
8
|
import N from "../../localization/SignIn.json.js";
|