P-13 начало валидации

This commit is contained in:
iriska-gri committed 2024-05-14 16:57:54 +03:00
1 parent 8662dca882
commit c0144fffb0
10 files changed
+461 -284

No files matched your search

+16 -1
View File
@@ -11,6 +11,7 @@ class StateSize(models.Model):
verbose_name_plural = "Штатная численность"
def __str__(self):
return str(self.statesize)
#Модель Фактическая численность
class FactSize(models.Model):
factsize = models.IntegerField( verbose_name="Фактическая численность")
@@ -45,4 +46,18 @@ class Vacancies(models.Model):
verbose_name = "Вакансия "
verbose_name_plural = "Вакансии"
def __str__(self):
return self.name
return self.name
# Отклик на вакансию
class ResponseVacancy(models.Model):
fio = models.CharField(max_length=300, verbose_name='ФИО')
cdate = models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')
text = models.TextField(null=True, verbose_name='Сообщение')
file = models.FileField(null=True, upload_to='response/%Y/%m/%d', verbose_name='Файл резюме')
vacancy = models.ForeignKey(Vacancies, on_delete=models.PROTECT, related_name='get_vacancies', verbose_name='Вакансия')
class Meta:
verbose_name = "Отклик на вакансию"
verbose_name_plural = "Отклики на вакансию"
def __str__(self):
return self.fio
+12 -4
View File
@@ -9,14 +9,22 @@ from rest_framework.response import Response
class GetStateSize(ListAPIView):
def get(self, request):
state_size = StateSize.objects.latest('date_created')
return Response(StateSizeSerializer(state_size).data)
state_size ={}
try:
state_size = StateSizeSerializer(StateSize.objects.latest('date_created')).data
except Exception as e:
pass
return Response(state_size)
class GetFactSize(ListAPIView):
def get(self, request):
fact_size = FactSize.objects.latest('date_created')
return Response(FactSizeSerializer(fact_size).data)
fact_size = {}
try:
fact_size = FactSizeSerializer(FactSize.objects.latest('date_created')).data
except Exception as e:
pass
return Response(fact_size)
class GetInspectionDirections(ListAPIView):
+1 -1
View File
@@ -77,7 +77,7 @@ class DailyRoundUpAPIView(APIView):
pass
+161 -95
View File
@@ -31,6 +31,7 @@
"pinia": "^2.0.23",
"roboto-fontface": "*",
"v-tooltip": "^2.1.3",
"vee-validate": "^4.12.8",
"vue": "^3.2.0",
"vue-cal": "^4.8.1",
"vue-chartjs": "^5.3.0",
@@ -40,7 +41,8 @@
"vue3-autocounter": "^1.0.6",
"vuelidate": "^0.7.7",
"vuetify": "^3.0.0",
"webfontloader": "^1.0.0"
"webfontloader": "^1.0.0",
"yup": "^1.4.0"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.4.6",
@@ -476,9 +478,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz",
"integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==",
"version": "7.24.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz",
"integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -3871,49 +3873,49 @@
}
},
"node_modules/@vue/compiler-core": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
"integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.27.tgz",
"integrity": "sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==",
"dependencies": {
"@babel/parser": "^7.21.3",
"@vue/shared": "3.3.4",
"@babel/parser": "^7.24.4",
"@vue/shared": "3.4.27",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
"source-map-js": "^1.2.0"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
"integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.27.tgz",
"integrity": "sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==",
"dependencies": {
"@vue/compiler-core": "3.3.4",
"@vue/shared": "3.3.4"
"@vue/compiler-core": "3.4.27",
"@vue/shared": "3.4.27"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
"integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.27.tgz",
"integrity": "sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==",
"dependencies": {
"@babel/parser": "^7.20.15",
"@vue/compiler-core": "3.3.4",
"@vue/compiler-dom": "3.3.4",
"@vue/compiler-ssr": "3.3.4",
"@vue/reactivity-transform": "3.3.4",
"@vue/shared": "3.3.4",
"@babel/parser": "^7.24.4",
"@vue/compiler-core": "3.4.27",
"@vue/compiler-dom": "3.4.27",
"@vue/compiler-ssr": "3.4.27",
"@vue/shared": "3.4.27",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0",
"postcss": "^8.1.10",
"source-map-js": "^1.0.2"
"magic-string": "^0.30.10",
"postcss": "^8.4.38",
"source-map-js": "^1.2.0"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
"integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.27.tgz",
"integrity": "sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==",
"dependencies": {
"@vue/compiler-dom": "3.3.4",
"@vue/shared": "3.3.4"
"@vue/compiler-dom": "3.4.27",
"@vue/shared": "3.4.27"
}
},
"node_modules/@vue/component-compiler-utils": {
@@ -3975,65 +3977,53 @@
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
},
"node_modules/@vue/devtools-api": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz",
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
"version": "6.6.1",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.1.tgz",
"integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA=="
},
"node_modules/@vue/reactivity": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
"integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.27.tgz",
"integrity": "sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==",
"dependencies": {
"@vue/shared": "3.3.4"
}
},
"node_modules/@vue/reactivity-transform": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
"integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
"dependencies": {
"@babel/parser": "^7.20.15",
"@vue/compiler-core": "3.3.4",
"@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0"
"@vue/shared": "3.4.27"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
"integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.27.tgz",
"integrity": "sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==",
"dependencies": {
"@vue/reactivity": "3.3.4",
"@vue/shared": "3.3.4"
"@vue/reactivity": "3.4.27",
"@vue/shared": "3.4.27"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
"integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.27.tgz",
"integrity": "sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==",
"dependencies": {
"@vue/runtime-core": "3.3.4",
"@vue/shared": "3.3.4",
"csstype": "^3.1.1"
"@vue/runtime-core": "3.4.27",
"@vue/shared": "3.4.27",
"csstype": "^3.1.3"
}
},
"node_modules/@vue/server-renderer": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
"integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.27.tgz",
"integrity": "sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==",
"dependencies": {
"@vue/compiler-ssr": "3.3.4",
"@vue/shared": "3.3.4"
"@vue/compiler-ssr": "3.4.27",
"@vue/shared": "3.4.27"
},
"peerDependencies": {
"vue": "3.3.4"
"vue": "3.4.27"
}
},
"node_modules/@vue/shared": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.27.tgz",
"integrity": "sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA=="
},
"node_modules/@vuelidate/core": {
"version": "2.0.3",
@@ -6810,9 +6800,9 @@
}
},
"node_modules/csstype": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/cyclist": {
"version": "1.0.2",
@@ -7502,6 +7492,17 @@
"safe-buffer": "~5.1.0"
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
@@ -11305,14 +11306,11 @@
}
},
"node_modules/magic-string": {
"version": "0.30.2",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.2.tgz",
"integrity": "sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==",
"version": "0.30.10",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz",
"integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
},
"engines": {
"node": ">=12"
}
},
"node_modules/make-dir": {
@@ -12878,9 +12876,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.32",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz",
"integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",
"version": "8.4.38",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
"funding": [
{
"type": "opencollective",
@@ -12898,7 +12896,7 @@
"dependencies": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
"source-map-js": "^1.2.0"
},
"engines": {
"node": "^10 || ^12 || >=14"
@@ -15993,6 +15991,11 @@
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true
},
"node_modules/property-expr": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz",
"integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA=="
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@@ -17505,9 +17508,9 @@
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
"engines": {
"node": ">=0.10.0"
}
@@ -18460,6 +18463,11 @@
"node": ">=0.6.0"
}
},
"node_modules/tiny-case": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz",
"integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q=="
},
"node_modules/tiny-invariant": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",
@@ -18564,6 +18572,11 @@
"integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==",
"dev": true
},
"node_modules/toposort": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz",
"integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg=="
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
@@ -19120,6 +19133,29 @@
"node": ">= 0.8"
}
},
"node_modules/vee-validate": {
"version": "4.12.8",
"resolved": "https://registry.npmjs.org/vee-validate/-/vee-validate-4.12.8.tgz",
"integrity": "sha512-A07rm3+y7SRk0CMD/O4nBT0nxtwjyfzGZwjEUDk18SxK0ZMzd4AFCzzdHlIiCE1QgHetxd0I3kVkZdN0GG0Oww==",
"dependencies": {
"@vue/devtools-api": "^6.6.1",
"type-fest": "^4.8.3"
},
"peerDependencies": {
"vue": "^3.4.26"
}
},
"node_modules/vee-validate/node_modules/type-fest": {
"version": "4.18.2",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz",
"integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==",
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/vendors": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz",
@@ -19217,15 +19253,23 @@
}
},
"node_modules/vue": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
"integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
"version": "3.4.27",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.27.tgz",
"integrity": "sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==",
"dependencies": {
"@vue/compiler-dom": "3.3.4",
"@vue/compiler-sfc": "3.3.4",
"@vue/runtime-dom": "3.3.4",
"@vue/server-renderer": "3.3.4",
"@vue/shared": "3.3.4"
"@vue/compiler-dom": "3.4.27",
"@vue/compiler-sfc": "3.4.27",
"@vue/runtime-dom": "3.4.27",
"@vue/server-renderer": "3.4.27",
"@vue/shared": "3.4.27"
},
"peerDependencies": {
"typescript": "*"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/vue-cal": {
@@ -21589,6 +21633,28 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/yup": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/yup/-/yup-1.4.0.tgz",
"integrity": "sha512-wPbgkJRCqIf+OHyiTBQoJiP5PFuAXaWiJK6AmYkzQAh5/c2K9hzSApBZG5wV9KoKSePF7sAxmNSvh/13YHkFDg==",
"dependencies": {
"property-expr": "^2.0.5",
"tiny-case": "^1.0.3",
"toposort": "^2.0.2",
"type-fest": "^2.19.0"
}
},
"node_modules/yup/node_modules/type-fest": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"engines": {
"node": ">=12.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
}
}
+3 -1
View File
@@ -33,6 +33,7 @@
"pinia": "^2.0.23",
"roboto-fontface": "*",
"v-tooltip": "^2.1.3",
"vee-validate": "^4.12.8",
"vue": "^3.2.0",
"vue-cal": "^4.8.1",
"vue-chartjs": "^5.3.0",
@@ -42,7 +43,8 @@
"vue3-autocounter": "^1.0.6",
"vuelidate": "^0.7.7",
"vuetify": "^3.0.0",
"webfontloader": "^1.0.0"
"webfontloader": "^1.0.0",
"yup": "^1.4.0"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.4.6",
@@ -48,58 +48,17 @@
</v-card-text>
</v-card>
</v-col>
<v-col class="w100 flex-column d-flex">
<v-card class="flex-grow-1">
<v-card-title class="text-h6 text-center text-uppercase">
Штатная численность
</v-card-title>
<v-card-text class="text-h2 text-center">
<vue3-autocounter
ref="counter"
:startAmount="0"
:endAmount="getstatesize.statesize"
:duration="2"
/>
</v-card-text>
<v-card-subtitle class="text-center"
>по состоянию на
{{
new Date(getstatesize.date_created).toLocaleDateString(
"ru-RU"
)
}}
</v-card-subtitle>
</v-card>
<!-- <v-divider></v-divider> -->
<v-card class="flex-grow-1 mt-1">
<v-card-title class="text-h6 text-center text-uppercase">
Фактическая численность
</v-card-title>
<v-card-text class="text-h2 text-center">
<vue3-autocounter
ref="counter"
:startAmount="0"
:endAmount="getfactsize.factsize"
:duration="2"
/>
</v-card-text>
<v-card-subtitle class="text-center"
>по состоянию на
{{
new Date(getfactsize.date_created).toLocaleDateString(
"ru-RU"
)
}}
</v-card-subtitle>
</v-card>
<v-col class="w100 flex-column d-flex" >
<general-information-size :size="getstatesize" :title="'Фактическая численнность'"/>
</v-col>
<v-col class="w100 flex-column d-flex">
<general-information-size :size="getfactsize" :title="'Штатная численность'"/>
</v-col>
</v-row>
</v-col>
<v-col>
<!-- v-for="direction in " -->
<v-card class="h-100 flex-column d-flex">
<v-card-title class="text-h6 text-uppercase text-center">
Основные направления деятельности инспекции
@@ -173,8 +132,10 @@ import { axiosApiInstance } from "@/utils/axios-api";
import { checkremote } from "@/utils/universal_functions";
import { spravURL, baseURL } from "@/utils/axios-api";
import { useDisplay } from "vuetify";
import GeneralInformationSize from '@/components/about_inspection/general_information/GeneralInformationSize.vue';
export default {
components: { GeneralInformationSize },
setup() {
const { lgAndUp } = useDisplay();
const userlinks = ref([]);
@@ -206,7 +167,6 @@ export default {
.get("api/about_inspection/getinspectiondirections/")
.then((res) => {
directionworks.value = res.data;
console.log(directionworks.value);
});
};
@@ -0,0 +1,53 @@
<template>
<v-card class="flex-grow-1 d-flex flex-column">
<v-card-title class="text-h6 text-center text-uppercase">
{{title}}
</v-card-title>
<template v-if="Object.keys(size).length > 0">
<v-card-text class="text-h2 text-center">
<vue3-autocounter
ref="counter"
:startAmount="0"
:endAmount="size.factsize"
:duration="2"
/>
</v-card-text>
<v-card-subtitle class="text-center"
>по состоянию на
{{
new Date(size.date_created).toLocaleDateString(
"ru-RU"
)
}}
</v-card-subtitle>
</template>
<template v-else>
<v-card
class="h-100 d-flex align-center justify-center text-center"
>
<span class="text-subtitle-1 text-grey"
>Данных нет</span
>
</v-card>
</template>
</v-card>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
},
size: {
type: Object,
default: () => {},
},
},
};
</script>
<style></style>
@@ -1,132 +1,132 @@
<template>
<v-row no-gutters class="h-100 gap" v-if="vacancy.length > 0">
<v-col lg="4" class="flex-column d-flex">
<v-card class="h-100 pa-1 ">
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
<v-card-title
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
>
<!-- :to='`/newsfull?id=${news.id}`' -->
<v-row>
<v-col class="d-flex justify-center">Вакансии</v-col>
</v-row>
Вакансии
</v-card-title>
<v-card-text class="h-100 pa-0 d-flex flex-column">
<v-row no-gutters class="h-0 gap overflow-auto">
<v-col>
<!-- <my-helper :pretext="vacancy" /> -->
<v-card class="mx-auto h-100 ">
<v-list density="compact px-0 ">
<v-list-item
v-for="vac in vacancy"
:key="vac.id"
:value="vac"
class="border-b-sm"
active-class="custom-active"
color="teal-darken-3"
@click="getIndVacation(vac.id)"
>
<v-card class="rounded-0 bg-transparent " >
<v-card-title class="text-wrap">
{{ vac.name }}
</v-card-title>
<v-card-text class="pb-2">
<v-row no-gutters class="gap ">
<v-col>{{ vac.department.name }}</v-col>
<v-col class="flex-grow-0 text-subtitle-1 text-btn_text">
Подробнее
</v-col>
<v-col class="flex-grow-0 align-self-center pl-2">
<v-icon icon="mdi-arrow-right" color="btn_text" size="small"/>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-list-item>
</v-list>
</v-card>
</v-col>
</v-row>
</v-card-text>
<v-row no-gutters class="h-0 gap overflow-auto">
<v-col>
<v-card class="mx-auto h-100">
<v-list density="compact px-0 ">
<v-list-item
v-for="vac in vacancy"
:key="vac.id"
:value="vac"
class="border-b-sm"
active-class="custom-active"
color="teal-darken-3"
@click="getIndVacation(vac.id)"
>
<v-card class="rounded-0 bg-transparent">
<v-card-title class="text-wrap">
{{ vac.name }}
</v-card-title>
<v-card-text class="pb-2">
<v-row no-gutters class="gap">
<v-col>{{ vac.department.name }}</v-col>
<v-col
class="flex-grow-0 text-subtitle-1 text-btn_text"
>
Подробнее
</v-col>
<v-col class="flex-grow-0 align-self-center pl-2">
<v-icon
icon="mdi-arrow-right"
color="btn_text"
size="small"
/>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-list-item>
</v-list>
</v-card>
</v-col>
</v-row>
</v-card>
</v-col>
<v-col>
<v-card class="h-100 pa-1">
<v-col class="flex-column d-flex">
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
<v-card-title
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
>
<v-row>
<v-col class="d-flex justify-center">Описание</v-col>
</v-row>
Описание
</v-card-title>
<v-card-text class="h-100 pa-0 d-flex flex-column">
<v-row no-gutters class="h-0 overflow-auto">
<v-col class="flex-column d-flex">
<v-card class="rounded-0 h-100" v-if="vacancyDescription.name!=''">
<v-card-title class="mt-4">
<span class="text-h4 text-wrap">
{{ vacancyDescription.name }}
</span>
</v-card-title>
<v-row no-gutters class="h-0 gap overflow-auto">
<v-col>
<v-card
class="rounded-0 h-100"
v-if="vacancyDescription.name != ''"
>
<v-card-title class="mt-4">
<span class="text-h4 text-wrap">
{{ vacancyDescription.name }}
</span>
</v-card-title>
<v-card-title class="pt-0">
<span class="text-h5">
{{ vacancyDescription.department.name }}
</span>
</v-card-title>
<v-card-title class="pt-6">
<span class="text-h6">
Направление деятельности подразделения
</span>
</v-card-title>
<v-card-text class="mx-5 my-1">
<ul>
<li
class="py-1"
v-for="directionTitle in vacancyDescription.department
.department_directions"
:key="directionTitle"
>
{{ directionTitle.direction_title }}
</li>
</ul>
</v-card-text>
<v-card-title>
<span class="text-h6">
Функционал и должностные обязанности
</span>
</v-card-title>
<v-card-text class="mx-5 my-0 ckeditor_ul">
<div
<v-card-title class="pt-0">
<span class="text-h5">
{{ vacancyDescription.department.name }}
</span>
</v-card-title>
<v-card-title class="pt-6">
<span class="text-h6">
Направление деятельности подразделения
</span>
</v-card-title>
<v-card-text class="mx-5 my-1">
<ul>
<li
class="py-1"
v-html="vacancyDescription.functional"
></div>
</v-card-text>
<v-card-title>
<span class="text-h6"> Базовые требования к соискателю </span>
</v-card-title>
<v-card-text class="mx-5 my-0 ckeditor_ul">
<div
class="py-1"
v-html="vacancyDescription.functional"
></div>
</v-card-text>
</v-card>
<v-card class="h-100 pa-1 d-flex align-center justify-center text-center" v-else>
<v-card-subtitle>
<v-icon icon="mdi-format-list-bulleted" color="grey" size="x-large" />
<br />
<span class="text-h5 text-grey"
>Для подробного описания вакансии <br> выберите её из списка слева</span
>
</v-card-subtitle>
</v-card>
</v-col>
</v-row>
</v-card-text>
v-for="directionTitle in vacancyDescription.department
.department_directions"
:key="directionTitle"
>
{{ directionTitle.direction_title }}
</li>
</ul>
</v-card-text>
<v-card-title>
<span class="text-h6">
Функционал и должностные обязанности
</span>
</v-card-title>
<v-card-text class="mx-5 my-0 ckeditor_ul">
<div class="py-1" v-html="vacancyDescription.functional"></div>
</v-card-text>
<v-card-title>
<span class="text-h6"> Базовые требования к соискателю </span>
</v-card-title>
<v-card-text class="mx-5 my-0 ckeditor_ul">
<div class="py-1" v-html="vacancyDescription.functional"></div>
</v-card-text>
<v-divider />
<response-vacancies/>
</v-card>
<v-card
class="h-100 pa-1 d-flex align-center justify-center text-center"
v-else
>
<v-card-subtitle>
<v-icon
icon="mdi-format-list-bulleted"
color="grey"
size="x-large"
/>
<br />
<span class="text-h5 text-grey"
>Для подробного описания вакансии <br />
выберите её из списка слева</span
>
</v-card-subtitle>
</v-card>
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
@@ -134,7 +134,7 @@
<v-col class="flex-column d-flex">
<v-card class="h-100 pa-1 d-flex align-center justify-center text-center">
<v-card-subtitle>
<v-icon icon="mdi-credit-card-off" size="x-large" color="grey"/>
<v-icon icon="mdi-credit-card-off" size="x-large" color="grey" />
<br />
<span class="text-h5 text-grey"
>Сейчас вакансий нет, <br />
@@ -150,24 +150,20 @@
import { ref } from "vue";
import { clearAxios } from "@/utils/axios-api";
import { baseURL } from "@/utils/axios-api";
import myHelper from "../../UI/my-helper.vue";
import ResponseVacancies from '@/components/about_inspection/open_vacancies/ResponseVacancies.vue';
export default {
components: { myHelper },
components: { ResponseVacancies },
setup() {
let vacancyDescription = ref({ name: "", department: { name: "" } });
let vacancySelect = ref(-1);
let vacancy = ref({});
const getVacancies = () => {
clearAxios.get(`api/about_inspection/getvacancy/`).then((data) => {
vacancy.value = data.data;
vacancyDescription.value = vacancy.value[0]
vacancyDescription.value = vacancy.value[0];
// console.log(, 'data')
});
};
@@ -180,21 +176,15 @@ export default {
};
const getIndVacation = (ind) => {
// vacancySelect.value = ind
// vacancySelect.value = !vacancySelect.value;
console.log(vacancy.value[0], '-----------------');
if (vacancySelect.value != ind) {
vacancySelect.value = ind
vacancySelect.value = ind;
vacancyDescription.value = vacancy.value.find((el) => el.id == ind);
} else {
vacancySelect.value = -1
vacancySelect.value = -1;
vacancyDescription.value = { name: "", department: { name: "" } };
}
};
getVacancies();
return {
@@ -213,9 +203,8 @@ export default {
padding-top: 8px;
}
.custom-active .v-card-title {
color:#001e19;
color: #001e19;
}
.custom-active .v-card-text {
@@ -0,0 +1,85 @@
<template>
<div>
<v-card-text class="text-center">
<span class="text-h4">Откликнуться на вакансию</span>
</v-card-text>
<form @submit.prevent="submit">
<v-text-field
v-model="name.value.value"
:counter="10"
:error-messages="name.errorMessage.value"
label="Name"
></v-text-field>
<!-- <v-text-field
v-model="phone.value.value"
:counter="7"
:error-messages="phone.errorMessage.value"
label="Phone Number"
></v-text-field> -->
<!-- <v-text-field
v-model="email.value.value"
:error-messages="email.errorMessage.value"
label="E-mail"
></v-text-field> -->
<!-- <v-btn class="me-4" type="submit"> submit </v-btn>
<v-btn @click="handleReset"> clear </v-btn> -->
</form>
</div>
</template>
<script>
import { ref } from "vue";
import { useField, useForm } from "vee-validate";
import * as yup from "yup";
export default {
setup() {
const { handleSubmit, handleReset } = useForm({
validationSchema: {
name (value) {
if (value?.length >= 2) return true
return 'Name needs to be at least 2 characters.'
},
phone (value) {
if (value?.length > 9 && /[0-9-]+/.test(value)) return true
return 'Phone number needs to be at least 9 digits.'
},
email (value) {
if (/^[a-z.-]+@[a-z.-]+\.[a-z]+$/i.test(value)) return true
return 'Must be a valid e-mail.'
},
select (value) {
if (value) return true
return 'Select an item.'
},
checkbox (value) {
if (value === '1') return true
return 'Must be checked.'
},
},
})
const name = useField('name')
const phone = useField('phone')
const email = useField('email')
const submit = handleSubmit(values => {
console.log('helloooo');
})
return {
email,
};
},
};
</script>
<style></style>
@@ -135,7 +135,6 @@ export default {
const getStructure = () => {
axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => {
structures.value = res.data;
console.log(structures.value);
});
};