Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doma-9987 synchronization template #5767

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Alexander-Turkin
Copy link
Contributor

add emoji, add symbols of transfer, add receiving template

@@ -191,8 +191,8 @@ export const CreateNewsForm: React.FC = () => {
const templates = isNewsItemTemplatesFetching || !newsItemTemplates?.length ? null : newsItemTemplates
.reduce((acc, template) => {
acc[template.id] = {
title: template.title,
body: template.body,
title: template.title.replace(/<\/br>/g, '\n'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the /n on
templates because when sending the transfer symbol is shielded, well, here you need to return it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use url encoding?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think u need to rebase :-) strange that u add a new submodule, u should be just updating one added by @sitozzz

@@ -1462,6 +1466,7 @@ export const BaseNewsForm: React.FC<BaseNewsFormProps> = ({
(getStepTypeByStep(currentStep) === 'sharingApp') && (
// TODO (DOMA-9328) Move onSkip to BaseNewsForm component, since steps are handled here!
<NewsItemSharingForm
template={{ id: templateId, ...templates[templateId] }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just ...templates[templateId] ?

@@ -191,8 +191,8 @@ export const CreateNewsForm: React.FC = () => {
const templates = isNewsItemTemplatesFetching || !newsItemTemplates?.length ? null : newsItemTemplates
.reduce((acc, template) => {
acc[template.id] = {
title: template.title,
body: template.body,
title: template.title.replace(/<\/br>/g, '\n'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use url encoding?

@@ -1,4 +1,4 @@
import { B2BApp } from '@app/condo/schema'
import { B2BApp, NewsItemTemplateTypeType } from '@app/condo/schema'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why TypeType?

apps/condo/domains/news/schema/NewsItemTemplate.test.js Outdated Show resolved Hide resolved
@@ -621,7 +621,11 @@ export const BaseNewsForm: React.FC<BaseNewsFormProps> = ({
Body.setTextLength(initialBody.length)
}, [])

const [templateId, setTemplateId] = useState('')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when dealing with Ids its more clean to make values null || string

Comment on lines +49 to +53
hooks: {
resolveInput: async ({ resolvedData }) => {
return normalizeText(resolvedData['title'])
},
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do same for the name field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, field is used in the selector

Copy link
Contributor

@Alllex202 Alllex202 Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this type for the name field: Text, not Select

This means that users can write anything there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants