Skip to content

Commit

Permalink
Merge pull request #1179 from nataliauvarova/kalmyk_markup
Browse files Browse the repository at this point in the history
kalmyk markup: fix styles
  • Loading branch information
nataliauvarova authored Dec 24, 2024
2 parents 7b59f0a + 69f4713 commit 06f27fb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
26 changes: 14 additions & 12 deletions src/components/JoinMarkupsModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const saveMarkupGroupsMutation = gql`
}
`;


export const refetchLexicalEntries = (entry_ids, client) =>
entry_ids.forEach(le_id =>
client.query({
Expand Down Expand Up @@ -106,7 +105,7 @@ const JoinMarkupsModal = ({ perspectiveId, onClose }) => {
});

const [saveMarkupGroups] = useMutation(saveMarkupGroupsMutation, {
onCompleted: ({save_markup_groups: result}) => {
onCompleted: ({ save_markup_groups: result }) => {
if (result.triumph) {
setSuccessMessage(
`${getTranslation("Markup groups were saved into xlsx file.")}
Expand Down Expand Up @@ -240,18 +239,19 @@ const JoinMarkupsModal = ({ perspectiveId, onClose }) => {

const onSaveXlsx = useCallback(() => {
const groupList = [];
const fieldList =
Object.keys(markupDict).map(id => id.split("_")[1]).concat([getTranslation('Type'), getTranslation('Author')]);
const fieldList = Object.keys(markupDict)
.map(id => id.split("_")[1])
.concat([getTranslation("Type"), getTranslation("Author")]);

for (const group of Object.values(groupDict)) {
groupList.push({
text: group.markups.map(m => m.text),
type: getTranslation(group.type),
author: group.author_name,
author: group.author_name
});
}

saveMarkupGroups({variables: {perspectiveId, fieldList, groupList}});
saveMarkupGroups({ variables: { perspectiveId, fieldList, groupList } });
}, [markupDict, groupDict]);

if (Object.keys(markupDict) < 2) {
Expand All @@ -276,11 +276,13 @@ const JoinMarkupsModal = ({ perspectiveId, onClose }) => {
"Lexico-grammatical replacement",
"Antonymous",
"Compensation"
].sort().map((t, k) => ({
key: k,
value: t,
text: getTranslation(t)
}));
]
.sort()
.map((t, k) => ({
key: k,
value: t,
text: getTranslation(t)
}));

return (
<Modal className="lingvo-modal2" dimmer open closeIcon onClose={onClose} size="fullscreen">
Expand Down Expand Up @@ -367,8 +369,8 @@ const JoinMarkupsModal = ({ perspectiveId, onClose }) => {
setTypeRelation(value);
resetMessages();
}}
className="lingvo-dropdown-select"
/>
<p/>
<Button
content={getTranslation("Join markups")}
onClick={onAddRelation}
Expand Down
10 changes: 8 additions & 2 deletions src/components/JoinMarkupsModal/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,20 @@

&__actions {
flex: 0 1 auto;
min-width: 197px;
min-width: 330px;
max-width: 330px;
display: flex;
flex-direction: column;
padding: 10px;
padding-right: 0;

& .ui.button {
margin-top: 10px !important;
margin-top: 20px !important;
}

@media only screen and (max-device-width: 1230px), only screen and (max-width: 1230px) {
min-width: 250px;
max-width: 250px;
}

@media only screen and (max-device-width: 767px), only screen and (max-width: 767px) {
Expand Down

0 comments on commit 06f27fb

Please sign in to comment.