fix: kursor slomal yaml
This commit is contained in:
parent
50f3278221
commit
5014fa90a7
@ -5,7 +5,7 @@ on:
|
|||||||
registry_package:
|
registry_package:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# CreateImage:
|
# CreateImage:
|
||||||
# runs-on: [skeris]
|
# runs-on: [skeris]
|
||||||
# uses: https://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
# uses: https://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
||||||
|
@ -1,125 +0,0 @@
|
|||||||
describe("Форма Входа", () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit("http://localhost:3000")
|
|
||||||
cy.wait(1000)
|
|
||||||
cy.contains("Личный кабинет").click()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна успешно входить с правильными учетными данными", () => {
|
|
||||||
const login = "valid_user@example.com"
|
|
||||||
const password = "valid_password"
|
|
||||||
|
|
||||||
cy.get("#login").type(login)
|
|
||||||
cy.get("#password").type(password)
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.wait(2000)
|
|
||||||
cy.url().should("include", "http://localhost:3000/tariffs")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать два сообщение об ошибке при отсутствии полей", () => {
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.wait(2000)
|
|
||||||
cy.get("#password-helper-text").should("contain", "Поле обязательно")
|
|
||||||
cy.get("#login-helper-text").should("contain", "Поле обязательно")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать сообщение об ошибке при отсутствии пароля", () => {
|
|
||||||
cy.get("#login").type("valid_email@example.com")
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#password-helper-text").should("contain", "Поле обязательно")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать сообщение об ошибке при отсутствии Логина", () => {
|
|
||||||
cy.get("#password").type("valid_password")
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#login-helper-text").should("contain", "Поле обязательно")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe("Форма регистрации", () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit("http://localhost:3000")
|
|
||||||
cy.wait(1000)
|
|
||||||
cy.contains("Личный кабинет").click()
|
|
||||||
cy.contains("Регистрация").click()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна регистрировать нового пользователя с правильными данными", () => {
|
|
||||||
const login = Cypress._.random(1000) + "@example.com"
|
|
||||||
const password = "valid_password"
|
|
||||||
|
|
||||||
cy.get("#login").type(login)
|
|
||||||
cy.get("#password").type(password)
|
|
||||||
cy.get("#repeatPassword").type(password)
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
cy.wait(5000)
|
|
||||||
|
|
||||||
cy.url().should("include", "http://localhost:3000/tariffs")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать ошибку при отсутсвии логина", () => {
|
|
||||||
cy.get("#password").type("valid_password")
|
|
||||||
cy.get("#repeatPassword").type("valid_password")
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#login-helper-text").should("contain", "Поле обязательно")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать ошибку при отсутствии пароля", () => {
|
|
||||||
cy.get("#login").type("valid_login")
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#password-helper-text").should("contain", "Поле обязательно")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать ошибку при отсутствии поля Повторения пароля", () => {
|
|
||||||
cy.get("#login").type("valid_login")
|
|
||||||
cy.get("#password").type("valid_password")
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#repeatPassword-helper-text").should("contain", "Повторите пароль")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать ошибку при некоректном пароле", () => {
|
|
||||||
cy.get("#login").type("valid_log")
|
|
||||||
cy.get("#password").type("valid@12_-_@@password")
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#password-helper-text").should("contain", "Некорректные символы")
|
|
||||||
|
|
||||||
cy.get("#repeatPassword-helper-text").should("contain", "Повторите пароль")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("должна отображать ошибку при несовпадении паролей", () => {
|
|
||||||
cy.get("#login").type("valid_login")
|
|
||||||
cy.get("#password").type("valid_password")
|
|
||||||
cy.get("#repeatPassword").type("invalidPassword")
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.get("#repeatPassword-helper-text").should("contain", "Пароли не совпадают")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("попытка отправки запроса при уже зарегистрированном пользователе", () => {
|
|
||||||
const login = "valid_user@example.com"
|
|
||||||
const password = "valid_password"
|
|
||||||
|
|
||||||
cy.get("#login").type(login)
|
|
||||||
cy.get("#password").type(password)
|
|
||||||
cy.get("#repeatPassword").type(password)
|
|
||||||
|
|
||||||
cy.get("button[type=\"submit\"]").click()
|
|
||||||
|
|
||||||
cy.wait(5000)
|
|
||||||
cy.contains("user with this login is exist")
|
|
||||||
})
|
|
||||||
})
|
|
@ -3,7 +3,7 @@ services:
|
|||||||
container_name: hub
|
container_name: hub
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: hub
|
hostname: hub
|
||||||
image: gitea.pena/penaside/front-hub/main:$latest
|
image: gitea.pena/penaside/front-hub/main:latest
|
||||||
tty: true
|
tty: true
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
|
|
||||||
|
140
package-lock.json
generated
140
package-lock.json
generated
@ -11,9 +11,10 @@
|
|||||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||||
"@emotion/react": "^11.10.5",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@frontend/kitui": "^1.0.96",
|
"@frontend/kitui": "^1.0.110",
|
||||||
"@mui/icons-material": "^5.10.14",
|
"@mui/icons-material": "^5.10.14",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
|
"@mui/x-date-pickers": "^7.13.0",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
@ -24,6 +25,7 @@
|
|||||||
"immer": "^10.0.2",
|
"immer": "^10.0.2",
|
||||||
"isomorphic-fetch": "^3.0.0",
|
"isomorphic-fetch": "^3.0.0",
|
||||||
"js-big-decimal": "^2.0.7",
|
"js-big-decimal": "^2.0.7",
|
||||||
|
"moment": "^2.30.1",
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"pdfjs-dist": "3.6.172",
|
"pdfjs-dist": "3.6.172",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
@ -31,9 +33,10 @@
|
|||||||
"react-error-boundary": "^4.0.11",
|
"react-error-boundary": "^4.0.11",
|
||||||
"react-pdf": "^7.1.2",
|
"react-pdf": "^7.1.2",
|
||||||
"react-router-dom": "^6.23.0",
|
"react-router-dom": "^6.23.0",
|
||||||
"react-slick": "^0.29.0",
|
"react-slick": "^0.30.3",
|
||||||
"slick-carousel": "^1.8.1",
|
"slick-carousel": "^1.8.1",
|
||||||
"swr": "^2.2.5",
|
"swr": "^2.2.5",
|
||||||
|
"transliteration": "^2.3.5",
|
||||||
"use-debounce": "^10.0.0",
|
"use-debounce": "^10.0.0",
|
||||||
"web-vitals": "^2.1.0",
|
"web-vitals": "^2.1.0",
|
||||||
"yup": "^1.1.1",
|
"yup": "^1.1.1",
|
||||||
@ -48,7 +51,7 @@
|
|||||||
"@types/node": "^16.7.13",
|
"@types/node": "^16.7.13",
|
||||||
"@types/react": "^18.0.0",
|
"@types/react": "^18.0.0",
|
||||||
"@types/react-dom": "^18.0.0",
|
"@types/react-dom": "^18.0.0",
|
||||||
"@types/react-slick": "^0.23.10",
|
"@types/react-slick": "^0.23.13",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
||||||
"@typescript-eslint/parser": "^6.9.1",
|
"@typescript-eslint/parser": "^6.9.1",
|
||||||
"craco-alias": "^3.0.1",
|
"craco-alias": "^3.0.1",
|
||||||
@ -2905,10 +2908,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@frontend/kitui": {
|
"node_modules/@frontend/kitui": {
|
||||||
"version": "1.0.96",
|
"version": "1.0.110",
|
||||||
"resolved": "http://gitea.pena/api/packages/skeris/npm/%40frontend%2Fkitui/-/1.0.96/kitui-1.0.96.tgz",
|
"resolved": "http://gitea.pena/api/packages/skeris/npm/%40frontend%2Fkitui/-/1.0.110/kitui-1.0.110.tgz",
|
||||||
"integrity": "sha512-JT8eR3Q5w1cDgQIALUGBfklH1ubW1bolWuhBVgQKuMWsCLfZtZvoAFXU1T1M4Ma55H87eL0Lu0bVPI0ne3gAJQ==",
|
"integrity": "sha512-XOCev5zNtNZ8fu3IfK6oFNOqT8lE9jlmUX1kQ3OO+H30/LBpnBrww9nV/aHV2TEm0wYXdRMvaEtU6VOb72sDdg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"immer": "^10.0.2",
|
"immer": "^10.0.2",
|
||||||
"reconnecting-eventsource": "^1.6.2"
|
"reconnecting-eventsource": "^1.6.2"
|
||||||
@ -3890,6 +3892,90 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@mui/x-date-pickers": {
|
||||||
|
"version": "7.29.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.29.4.tgz",
|
||||||
|
"integrity": "sha512-wJ3tsqk/y6dp+mXGtT9czciAMEO5Zr3IIAHg9x6IL0Eqanqy0N3chbmQQZv3iq0m2qUpQDLvZ4utZBUTJdjNzw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.25.7",
|
||||||
|
"@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0",
|
||||||
|
"@mui/x-internals": "7.29.0",
|
||||||
|
"@types/react-transition-group": "^4.4.11",
|
||||||
|
"clsx": "^2.1.1",
|
||||||
|
"prop-types": "^15.8.1",
|
||||||
|
"react-transition-group": "^4.4.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/mui-org"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@emotion/react": "^11.9.0",
|
||||||
|
"@emotion/styled": "^11.8.1",
|
||||||
|
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
||||||
|
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
||||||
|
"date-fns": "^2.25.0 || ^3.2.0 || ^4.0.0",
|
||||||
|
"date-fns-jalali": "^2.13.0-0 || ^3.2.0-0 || ^4.0.0-0",
|
||||||
|
"dayjs": "^1.10.7",
|
||||||
|
"luxon": "^3.0.2",
|
||||||
|
"moment": "^2.29.4",
|
||||||
|
"moment-hijri": "^2.1.2 || ^3.0.0",
|
||||||
|
"moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0",
|
||||||
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||||
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@emotion/react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@emotion/styled": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"date-fns": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"date-fns-jalali": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"dayjs": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"luxon": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"moment": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"moment-hijri": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"moment-jalaali": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@mui/x-internals": {
|
||||||
|
"version": "7.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@mui/x-internals/-/x-internals-7.29.0.tgz",
|
||||||
|
"integrity": "sha512-+Gk6VTZIFD70XreWvdXBwKd8GZ2FlSCuecQFzm6znwqXg1ZsndavrhG9tkxpxo2fM1Zf7Tk8+HcOO0hCbhTQFA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.25.7",
|
||||||
|
"@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/mui-org"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
|
"node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
|
||||||
"version": "5.1.1-v1",
|
"version": "5.1.1-v1",
|
||||||
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
|
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
|
||||||
@ -7584,7 +7670,6 @@
|
|||||||
"version": "8.0.1",
|
"version": "8.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"string-width": "^4.2.0",
|
"string-width": "^4.2.0",
|
||||||
@ -12002,7 +12087,6 @@
|
|||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "6.* || 8.* || >= 10.*"
|
"node": "6.* || 8.* || >= 10.*"
|
||||||
@ -16670,6 +16754,14 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
@ -21210,10 +21302,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-slick": {
|
"node_modules/react-slick": {
|
||||||
"version": "0.29.0",
|
"version": "0.30.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.30.3.tgz",
|
||||||
"integrity": "sha512-TGdOKE+ZkJHHeC4aaoH85m8RnFyWqdqRfAGkhd6dirmATXMZWAxOpTLmw2Ll/jPTQ3eEG7ercFr/sbzdeYCJXA==",
|
"integrity": "sha512-B4x0L9GhkEWUMApeHxr/Ezp2NncpGc+5174R02j+zFiWuYboaq98vmxwlpafZfMjZic1bjdIqqmwLDcQY0QaFA==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"enquire.js": "^2.1.6",
|
"enquire.js": "^2.1.6",
|
||||||
@ -21222,8 +21313,8 @@
|
|||||||
"resize-observer-polyfill": "^1.5.0"
|
"resize-observer-polyfill": "^1.5.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0",
|
"react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||||
"react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0"
|
"react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-transition-group": {
|
"node_modules/react-transition-group": {
|
||||||
@ -21515,7 +21606,6 @@
|
|||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
@ -23912,6 +24002,21 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/transliteration": {
|
||||||
|
"version": "2.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/transliteration/-/transliteration-2.3.5.tgz",
|
||||||
|
"integrity": "sha512-HAGI4Lq4Q9dZ3Utu2phaWgtm3vB6PkLUFqWAScg/UW+1eZ/Tg6Exo4oC0/3VUol/w4BlefLhUUSVBr/9/ZGQOw==",
|
||||||
|
"dependencies": {
|
||||||
|
"yargs": "^17.5.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"slugify": "dist/bin/slugify",
|
||||||
|
"transliterate": "dist/bin/transliterate"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tryer": {
|
"node_modules/tryer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
|
||||||
@ -25960,7 +26065,6 @@
|
|||||||
"version": "5.0.8",
|
"version": "5.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||||
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
@ -25985,7 +26089,6 @@
|
|||||||
"version": "17.7.2",
|
"version": "17.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
||||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cliui": "^8.0.1",
|
"cliui": "^8.0.1",
|
||||||
@ -26004,7 +26107,6 @@
|
|||||||
"version": "21.1.1",
|
"version": "21.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
||||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
|
@ -69,7 +69,7 @@ export default function AnyServicePayment() {
|
|||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
if (user?._id === URLuserId) {
|
if (user?._id === URLuserId) {
|
||||||
return;
|
return <ApologyPage message={message} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (URLaction && URLmoneyDifferent && URLtoken) {
|
if (URLaction && URLmoneyDifferent && URLtoken) {
|
||||||
@ -81,7 +81,6 @@ export default function AnyServicePayment() {
|
|||||||
|
|
||||||
setAuthToken(URLtoken);
|
setAuthToken(URLtoken);
|
||||||
setUserId(URLuserId);
|
setUserId(URLuserId);
|
||||||
return;
|
|
||||||
})();
|
})();
|
||||||
} else {
|
} else {
|
||||||
var link = document.createElement("a");
|
var link = document.createElement("a");
|
||||||
|
@ -109,8 +109,8 @@ export default function History() {
|
|||||||
<Typography textAlign="center">Нет данных</Typography>
|
<Typography textAlign="center">Нет данных</Typography>
|
||||||
)}
|
)}
|
||||||
{/* Для ненормального rawDetails */}
|
{/* Для ненормального rawDetails */}
|
||||||
{historyData
|
{(historyData as (HistoryRecord | HistoryRecord2)[])
|
||||||
?.filter((e): e is HistoryRecord => {
|
?.filter((e) => {
|
||||||
e.createdAt = extractDateFromString(e.createdAt);
|
e.createdAt = extractDateFromString(e.createdAt);
|
||||||
return (
|
return (
|
||||||
!e.isDeleted &&
|
!e.isDeleted &&
|
||||||
@ -120,26 +120,27 @@ export default function History() {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
.map((e, index) => {
|
.map((e, index) => {
|
||||||
|
const record = e as HistoryRecord;
|
||||||
return (
|
return (
|
||||||
<Box key={index} sx={{ mt: index === 0 ? "27px" : "0px" }}>
|
<Box key={index} sx={{ mt: index === 0 ? "27px" : "0px" }}>
|
||||||
<AccordionWrapper
|
<AccordionWrapper
|
||||||
first={index === 0}
|
first={index === 0}
|
||||||
last={index === historyData?.length - 1}
|
last={index === (historyData?.length || 0) - 1}
|
||||||
content={(e as HistoryRecord).rawDetails}
|
content={record.rawDetails}
|
||||||
mainId={(e as HistoryRecord).id}
|
mainId={record.id}
|
||||||
key={e.id}
|
key={record.id}
|
||||||
createdAt={e.createdAt}
|
createdAt={record.createdAt}
|
||||||
onClickMail={(event: any) => {
|
onClickMail={(event: any) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
handleHistoryResponse(e.id);
|
handleHistoryResponse(record.id);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{/* Для нормального rawDetails */}
|
{/* Для нормального rawDetails */}
|
||||||
{historyData
|
{(historyData as (HistoryRecord | HistoryRecord2)[])
|
||||||
?.filter((e): e is HistoryRecord2 => {
|
?.filter((e) => {
|
||||||
e.createdAt = extractDateFromString(e.createdAt);
|
e.createdAt = extractDateFromString(e.createdAt);
|
||||||
return (
|
return (
|
||||||
!e.isDeleted &&
|
!e.isDeleted &&
|
||||||
@ -149,16 +150,17 @@ export default function History() {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
.map((e, index) => {
|
.map((e, index) => {
|
||||||
|
const record = e as HistoryRecord2;
|
||||||
return (
|
return (
|
||||||
<Box key={index} sx={{ mt: index === 0 ? "27px" : "0px" }}>
|
<Box key={index} sx={{ mt: index === 0 ? "27px" : "0px" }}>
|
||||||
<AccordionWrapper2
|
<AccordionWrapper2
|
||||||
key={e.id}
|
key={record.id}
|
||||||
first={index === 0}
|
first={index === 0}
|
||||||
last={index === historyData?.length - 1}
|
last={index === (historyData?.length || 0) - 1}
|
||||||
mainId={(e as HistoryRecord2).id}
|
mainId={record.id}
|
||||||
createdAt={e.createdAt}
|
createdAt={record.createdAt}
|
||||||
tariff={e.rawDetails.tariffs[0]}
|
tariff={record.rawDetails.tariffs[0]}
|
||||||
price={e.rawDetails.price / 100}
|
price={record.rawDetails.price / 100}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -316,6 +316,9 @@ export default function Payment() {
|
|||||||
{upMd && <Typography mb="56px">Выберите способ оплаты</Typography>}
|
{upMd && <Typography mb="56px">Выберите способ оплаты</Typography>}
|
||||||
<Typography mb="20px">К оплате</Typography>
|
<Typography mb="20px">К оплате</Typography>
|
||||||
{
|
{
|
||||||
|
// Показываем фиксированную сумму если:
|
||||||
|
// 1. Есть активный процесс покупки (siteReadyPayCart существует)
|
||||||
|
// 2. Есть сумма для оплаты (notEnoughMoneyAmount > 0)
|
||||||
siteReadyPayCart?.[userId] && notEnoughMoneyAmount > 0 ?
|
siteReadyPayCart?.[userId] && notEnoughMoneyAmount > 0 ?
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
@ -333,7 +336,7 @@ export default function Payment() {
|
|||||||
<InputTextfield
|
<InputTextfield
|
||||||
TextfieldProps={{
|
TextfieldProps={{
|
||||||
placeholder: "К оплате",
|
placeholder: "К оплате",
|
||||||
value: paymentValueField,
|
value: paymentValueField || (notEnoughMoneyAmount > 0 ? (notEnoughMoneyAmount / 100).toString() : ""),
|
||||||
type: "number",
|
type: "number",
|
||||||
}}
|
}}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
@ -48,7 +48,7 @@ export const useAutoPay = (): [string, React.Dispatch<React.SetStateAction<strin
|
|||||||
|
|
||||||
//Анализ нужно ли вообще вмешательство этого хука
|
//Анализ нужно ли вообще вмешательство этого хука
|
||||||
const condition1 = URLuserId !== null && URLuserId && URLuserId === userId;
|
const condition1 = URLuserId !== null && URLuserId && URLuserId === userId;
|
||||||
const condition2 = URLfromDomain === "quiz" || URLfromDomain === "squiz" || URLfromDomain === "hub" || URLfromDomain === "shub" || URLfromDomain === "localhost:3000";
|
const condition2 = URLfromDomain === "quiz" || URLfromDomain === "squiz" || URLfromDomain === "hub" || URLfromDomain === "shub" || URLfromDomain === "localhost:3000" || URLfromDomain === "quiz.pena.digital" || URLfromDomain === "squiz.pena.digital" || URLfromDomain === "hub.pena.digital" || URLfromDomain === "shub.pena.digital";
|
||||||
const condition3 = URLaction === "topupwallet" || URLaction === "createquizcc" || URLaction === "buy";
|
const condition3 = URLaction === "topupwallet" || URLaction === "createquizcc" || URLaction === "buy";
|
||||||
const condition4 = !Number.isNaN(URLmoneyDifferent);
|
const condition4 = !Number.isNaN(URLmoneyDifferent);
|
||||||
|
|
||||||
@ -62,7 +62,10 @@ export const useAutoPay = (): [string, React.Dispatch<React.SetStateAction<strin
|
|||||||
console.log("useAutoPay - условия выполнены, устанавливаем значения");
|
console.log("useAutoPay - условия выполнены, устанавливаем значения");
|
||||||
|
|
||||||
// Ставим флаг, что сайт в состоянии ожидания пополнения счёта для оплаты
|
// Ставим флаг, что сайт в состоянии ожидания пополнения счёта для оплаты
|
||||||
|
// Это нужно как для внутренних покупок корзины, так и для внешних платежей
|
||||||
|
if (URLuserId !== null) {
|
||||||
startPayCartProcess(URLuserId);
|
startPayCartProcess(URLuserId);
|
||||||
|
}
|
||||||
|
|
||||||
console.log("useAutoPay - устанавливаем fromDomain:", URLfromDomain);
|
console.log("useAutoPay - устанавливаем fromDomain:", URLfromDomain);
|
||||||
setFromDomain(URLfromDomain as FromDomain);
|
setFromDomain(URLfromDomain as FromDomain);
|
||||||
|
@ -11,8 +11,8 @@ export const useSSETab = <T = unknown>(
|
|||||||
): UseSSETabResult => {
|
): UseSSETabResult => {
|
||||||
const [openTimeSetted, seteOpenTimeSetted] = useState<boolean>(false);
|
const [openTimeSetted, seteOpenTimeSetted] = useState<boolean>(false);
|
||||||
const [activeSSETab, setActiveSSETab] = useState<boolean>(false);
|
const [activeSSETab, setActiveSSETab] = useState<boolean>(false);
|
||||||
const updateTimeIntervalId = useRef<NodeJS.Timer | null>(null);
|
const updateTimeIntervalId = useRef<any>(null);
|
||||||
const checkConnectionIntervalId = useRef<NodeJS.Timer | null>(null);
|
const checkConnectionIntervalId = useRef<any>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setOpenTime();
|
setOpenTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user