Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6583 Rev 6588
Línea 7... Línea 7...
7
 
7
 
8
const OverviewModal = ({
8
const OverviewModal = ({
9
    isOpen = false,
9
    isOpen = false,
10
    closeModal = function () { },
10
    closeModal = function () { },
11
    overviewUrl,
11
    overviewUrl,
-
 
12
    action,
12
    action
13
    overview
Línea 13... Línea 14...
13
}) => {
14
}) => {
14
 
15
 
Línea 35... Línea 36...
35
 
36
 
36
    useEffect(() => {
37
    useEffect(() => {
37
        register("description");
38
        register("description");
Línea 38... Línea -...
38
    }, []);
-
 
39
 
-
 
40
    useEffect(() => {
-
 
41
        getData(overviewUrl)
-
 
42
            .then(({ description }) => {
-
 
43
                setValue("description", description)
-
 
44
            })
-
 
45
            .catch(err => setError(err))
-
 
46
    }, [isOpen]);
39
    }, []);
47
 
40
 
48
    return (
41
    return (
49
        <Modal
42
        <Modal
50
            size="lg"
43
            size="lg"
Línea 56... Línea 49...
56
                <Modal.Title>Cambiar</Modal.Title>
49
                <Modal.Title>Cambiar</Modal.Title>
57
            </Modal.Header>
50
            </Modal.Header>
58
            <form onSubmit={handleSubmit(onSubmit)}>
51
            <form onSubmit={handleSubmit(onSubmit)}>
59
                <Modal.Body>
52
                <Modal.Body>
60
                    <div className="mb-3">
53
                    <div className="mb-3">
-
 
54
                        <label className="form-label">Visión general</label>
61
                        <CKEditor
55
                        <CKEditor
62
                            data={watch("description")}
56
                            data={watch("description")}
63
                            onChange={(e) => {
57
                            onChange={(e) => {
64
                                const text = e.editor.getData();
58
                                const text = e.editor.getData();
65
                                setValue("description", text);
59
                                setValue("description", text);
66
                            }}
60
                            }}
-
 
61
                            onInstanceReady={(e) => e.editor.setData(overview)}
67
                            config={{
62
                            config={{
68
                                toolbar: [
63
                                toolbar: [
69
                                    { name: 'editing', items: ['Scayt'] },
64
                                    { name: 'editing', items: ['Scayt'] },
70
                                    { name: 'links', items: ['Link', 'Unlink'] },
65
                                    { name: 'links', items: ['Link', 'Unlink'] },
71
                                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
66
                                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },