Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3170 | Rev 3173 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3170 Rev 3171
Línea 16... Línea 16...
16
import FormErrorFeedback from '@components/UI/form/FormErrorFeedback'
16
import FormErrorFeedback from '@components/UI/form/FormErrorFeedback'
17
import Modal from '@components/UI/modal/Modal'
17
import Modal from '@components/UI/modal/Modal'
18
import DropzoneComponent from '@components/dropzone/DropzoneComponent'
18
import DropzoneComponent from '@components/dropzone/DropzoneComponent'
19
import ConfirmModal from './ConfirmModal'
19
import ConfirmModal from './ConfirmModal'
20
import Select from '@components/UI/inputs/Select'
20
import Select from '@components/UI/inputs/Select'
-
 
21
import Form from '@components/common/form'
Línea 21... Línea 22...
21
 
22
 
22
const recomendationText = {
23
const recomendationText = {
23
  [shareModalTypes.IMAGE]: 'Tamaño recomendado: 720x720',
24
  [shareModalTypes.IMAGE]: 'Tamaño recomendado: 720x720',
24
  [shareModalTypes.FILE]: 'solo documentos PDF',
25
  [shareModalTypes.FILE]: 'solo documentos PDF',
Línea 169... Línea 170...
169
        show={isOpen}
170
        show={isOpen}
170
        title={labels.share_a_post}
171
        title={labels.share_a_post}
171
        labelAccept={labels.send}
172
        labelAccept={labels.send}
172
        labelReject={labels.cancel}
173
        labelReject={labels.cancel}
173
        onClose={onClose}
174
        onClose={onClose}
174
        onAccept={onSubmit}
-
 
175
        loading={isLoading}
175
        loading={isLoading}
-
 
176
        formId='share-form'
176
      >
177
      >
-
 
178
        <Form onSubmit={onSubmit} id='share-form'>
177
        {feedType === feedTypes.DASHBOARD ? (
179
          {feedType === feedTypes.DASHBOARD ? (
178
          <Select
180
            <Select
179
            name='shared_with'
181
              name='shared_with'
180
            defaultValue='p'
182
              defaultValue='p'
181
            control={control}
183
              control={control}
182
            options={[
184
              options={[
183
              { name: labels.public, value: 'p' },
185
                { name: labels.public, value: 'p' },
184
              { name: labels.connections, value: 'c' }
186
                { name: labels.connections, value: 'c' }
185
            ]}
187
              ]}
-
 
188
            />
-
 
189
          ) : null}
-
 
190
 
-
 
191
          <Ckeditor
-
 
192
            defaultValue={watchedDescription}
-
 
193
            onChange={(value) => setValue('description', value)}
186
          />
194
          />
187
        ) : null}
-
 
Línea 188... Línea -...
188
 
-
 
189
        <Ckeditor
-
 
190
          defaultValue={watchedDescription}
-
 
191
          onChange={(value) => setValue('description', value)}
-
 
192
        />
-
 
193
 
195
 
194
        {errors.description && (
196
          {errors.description && (
195
          <FormErrorFeedback>{errors.description.message}</FormErrorFeedback>
197
            <FormErrorFeedback>{errors.description.message}</FormErrorFeedback>
196
        )}
198
          )}
197
 
199
 
-
 
200
          {![shareModalTypes.POST, shareModalTypes.SHARE].includes(
-
 
201
            modalType
198
        {![shareModalTypes.POST, shareModalTypes.SHARE].includes(modalType) ? (
202
          ) ? (
199
          <DropzoneComponent
203
            <DropzoneComponent
200
            modalType={modalType}
204
              modalType={modalType}
201
            onUploaded={onUploadedHandler}
205
              onUploaded={onUploadedHandler}
202
            settedFile={watch('file')}
206
              settedFile={watch('file')}
203
            recomendationText={recomendationText[modalType] ?? ''}
207
              recomendationText={recomendationText[modalType] ?? ''}
204
          />
208
            />
205
        ) : null}
209
          ) : null}
206
 
210
 
207
        {errors.file && (
211
          {errors.file && (
208
          <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
212
            <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
-
 
213
          )}
209
        )}
214
        </Form>
210
      </Modal>
215
      </Modal>
211
      <ConfirmModal
216
      <ConfirmModal
212
        show={showConfirmModal}
217
        show={showConfirmModal}
213
        onClose={handleModalCancel}
218
        onClose={handleModalCancel}