+ {this.props.userType === UserType.Applicant &&
+ (this.props.isApplied ? (
+
+ ) : (
+
+ ))}
+
+ Все вакансии
+
+
+ {`последнее обновление: ${vacancy.createdAt.toLocaleString('ru-RU')}`}
+
+
)}
);
diff --git a/src/application/pages/cv_edit_page/cv_edit_page.scss b/src/application/pages/cv_edit_page/cv_edit_page.scss
index 73f9b41..1479d61 100644
--- a/src/application/pages/cv_edit_page/cv_edit_page.scss
+++ b/src/application/pages/cv_edit_page/cv_edit_page.scss
@@ -2,6 +2,7 @@
.cv-edit-page {
display: flex;
+ align-self: center;
flex-direction: column;
align-items: stretch;
justify-content: center;
@@ -17,18 +18,14 @@
border-radius: var(--radius-m);
background-color: var(--color-background-900);
- &__description-header {
- font-size: var(--text-size-8);
- color: var(--color-main-100);
- text-align: center;
- }
-
&__form {
display: flex;
flex-direction: column;
}
&__header {
+ font-size: var(--text-size-8);
+ color: var(--color-main-100);
text-align: center;
}
diff --git a/src/application/pages/cv_edit_page/cv_edit_page.tsx b/src/application/pages/cv_edit_page/cv_edit_page.tsx
index f8ae83f..62422b0 100644
--- a/src/application/pages/cv_edit_page/cv_edit_page.tsx
+++ b/src/application/pages/cv_edit_page/cv_edit_page.tsx
@@ -65,25 +65,24 @@ export class CvEditPage extends Component {
}
}
- private handleSubmit = (ev: Event) => {
+ private handleSubmit = async (ev: Event) => {
ev.preventDefault();
const formData = Object.fromEntries(new FormData(ev.target as HTMLFormElement));
- if (this.isCreatingCv) {
- cvActionCreators.createCv(formData).then(() => {
+ try {
+ if (this.isCreatingCv) {
+ await cvActionCreators.createCv(formData);
const cv = cvStore.getData().cv;
routerActionCreators.redirect(
resolveUrl('cv', { [CvEditPageParams.Id]: cv.id.toString() }),
);
- });
- } else {
- cvActionCreators
- .updateCv(this.cvId, formData)
- .then(() =>
- routerActionCreators.redirect(
- resolveUrl('cv', { [CvEditPageParams.Id]: this.cvId.toString() }),
- ),
+ } else {
+ await cvActionCreators.updateCv(this.cvId, formData);
+ routerActionCreators.redirect(
+ resolveUrl('cv', { [CvEditPageParams.Id]: this.cvId.toString() }),
);
- }
+ }
+ // TODO: handle error
+ } catch {}
};
handleFocusOut = (ev: Event) => {
@@ -115,134 +114,136 @@ export class CvEditPage extends Component {
}
const cvData = cvStore.getData().cv;
return (
-