Skip to content

Commit 33fa1f5

Browse files
authored
Merge pull request #372 from qa-guru/QAGDEV-703
QAGDEV-703 - После регистрации пользователя в профиле не возвращается номер телефона
2 parents 79878f7 + fadbe35 commit 33fa1f5

File tree

9 files changed

+12
-15
lines changed

9 files changed

+12
-15
lines changed

src/api/graphql/user/user.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ query user {
1111
linkedin
1212
avatar
1313
creationDate
14+
phoneNumber
1415
rating {
1516
rating
1617
}

src/features/edit-training/views/edit-lecture/edit-lecture.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,11 @@ const EditLecture: FC<IEditLecture> = ({
172172
navigate("/");
173173
})();
174174
};
175-
176-
const handleDeleteLectureFile = async (fileId: string) => {
175+
const handleDeleteLectureFile = (fileId: string) => {
177176
setDeletedLectureFileIds((prev) => [...prev, fileId]);
178177
};
179178

180-
const handleDeleteHomeworkFile = async (fileId: string) => {
179+
const handleDeleteHomeworkFile = (fileId: string) => {
181180
setDeletedHomeworkFileIds((prev) => [...prev, fileId]);
182181
};
183182

src/shared/components/form/input-phone/input-phone.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const InputPhone = <T extends FieldValues>({
2121
<Autocomplete
2222
options={countries}
2323
freeSolo
24+
inputValue={value}
25+
onInputChange={(_, newInputValue) => onChange(newInputValue)}
2426
getOptionLabel={(option) => {
2527
if (typeof option === "string") {
2628
return option;
@@ -41,12 +43,7 @@ const InputPhone = <T extends FieldValues>({
4143
)}
4244
renderInput={(params) => (
4345
<TextField
44-
value={value}
45-
onChange={onChange}
4646
{...params}
47-
inputProps={{
48-
...params.inputProps,
49-
}}
5047
label={label}
5148
placeholder={placeholder}
5249
InputLabelProps={InputLabelProps}

src/shared/components/text-editor/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export interface ITextEditor {
3636
content?: Maybe<string>;
3737
setPendingFiles?: React.Dispatch<React.SetStateAction<PendingFile[]>>;
3838
source: FileSourceType;
39-
handleDeleteFile?: (fileId: string) => Promise<void>;
39+
handleDeleteFile?: (fileId: string) => void;
4040
}

src/shared/features/send-comment/view/send-comment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const SendComment: FC<ISendComment> = (props) => {
9797
}
9898
};
9999

100-
const handleDeleteFile = async (fileId: string) => {
100+
const handleDeleteFile = (fileId: string) => {
101101
if (fileId.startsWith("blob:")) {
102102
setPendingFiles((prev) =>
103103
prev.filter((pending) => pending.localUrl !== fileId)

src/shared/features/send-homework/view/send-homework.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const SendHomework: FC<ISendHomeWork> = (props) => {
100100
}
101101
};
102102

103-
const handleDeleteFile = async (fileId: string) => {
103+
const handleDeleteFile = (fileId: string) => {
104104
if (fileId.startsWith("blob:")) {
105105
setPendingFiles((prev) =>
106106
prev.filter((pending) => pending.localUrl !== fileId)

src/shared/features/update-comment/view/update-comment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const UpdateComment: FC<IUpdateComment> = (props) => {
7373
}
7474
};
7575

76-
const handleDeleteFile = async (fileId: string) => {
76+
const handleDeleteFile = (fileId: string) => {
7777
if (fileId.startsWith("blob:")) {
7878
setPendingFiles((prev) =>
7979
prev.filter((pending) => pending.localUrl !== fileId)

src/shared/features/update-homework/view/update-homework.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const UpdateHomework: FC<IUpdateHomeWork> = (props) => {
7272
}
7373
};
7474

75-
const handleDeleteFile = async (fileId: string) => {
75+
const handleDeleteFile = (fileId: string) => {
7676
if (fileId.startsWith("blob:")) {
7777
setPendingFiles((prev) =>
7878
prev.filter((pending) => pending.localUrl !== fileId)

src/shared/lib/mui-tiptap/extensions/file-deletion-tracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const FileDeletionTracker = Extension.create<{
2121
key: new PluginKey("file-deletion-tracker"),
2222
appendTransaction(transactions, oldState, newState) {
2323
const docChanged = transactions.some((tr) => tr.docChanged);
24-
if (!docChanged) return;
24+
if (!docChanged) return null;
2525

2626
const oldFileIds = collectFileIds(oldState.doc);
2727
const newFileIds = collectFileIds(newState.doc);
@@ -36,7 +36,7 @@ export const FileDeletionTracker = Extension.create<{
3636
});
3737
}
3838

39-
return undefined;
39+
return null;
4040
},
4141
}),
4242
];

0 commit comments

Comments
 (0)