Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 382 Rev 384
Línea 1... Línea 1...
1
import React, { useState } from "react";
1
import React, { useState } from "react";
2
import { axios } from '../../../utils';
2
import { axios } from '../../../utils';
3
import Section from "./section/Section";
3
import Section from "./section/Section";
4
import Spinner from "../../../shared/loading-spinner/Spinner";
4
import Spinner from "../../../shared/loading-spinner/Spinner";
5
import ConfirmationBox from "../../../shared/confirmation-box/ConfirmationBox";
5
import ConfirmationBox from "../../../shared/confirmation-box/ConfirmationBox";
-
 
6
import ConfirmModal from "../../../shared/confirm-modal/ConfirmModal";
Línea 6... Línea 7...
6
 
7
 
Línea 7... Línea 8...
7
const Test = (props) => {
8
const Test = (props) => {
8
 
9
 
Línea 104... Línea 105...
104
                </div>
105
                </div>
105
            ) : (
106
            ) : (
106
                <div>
107
                <div>
107
                    {!success ? (
108
                    {!success ? (
108
                        <div className="row test-section">
109
                        <div className="row test-section">
-
 
110
 
-
 
111
                            <ConfirmModal
-
 
112
                                show={true}
-
 
113
                                title='Atención'
-
 
114
                                message='lorem lorem'
-
 
115
                                acceptLabel='Si salir'
-
 
116
                                onAccept={handleCancel}
-
 
117
                            />
-
 
118
 
109
                            <div className="col-md-12 col-sm-12 col-xs-12">
119
                            <div className="col-md-12 col-sm-12 col-xs-12">
110
                                <div className="company-title">
120
                                <div className="company-title">
111
                                    <div className="section_admin_title_buttons">
121
                                    <div className="section_admin_title_buttons">
112
                                        <h1 className="title">{test.name}</h1>
122
                                        <h1 className="title">{test.name}</h1>
113
                                    </div>
123
                                    </div>
Línea 123... Línea 133...
123
                                </div>
133
                                </div>
124
                            ) : (
134
                            ) : (
125
                                <div className="col-md-12 col-sm-12 col-xs-12">
135
                                <div className="col-md-12 col-sm-12 col-xs-12">
126
                                    <div className="company-title">
136
                                    <div className="company-title">
127
                                        {test.content.map((section, key) => {
137
                                        {test.content.map((section, key) => {
-
 
138
                                            return (
128
                                            return <Section
139
                                                <Section
129
                                                section={section}
140
                                                    section={section}
130
                                                key={key}
141
                                                    key={key}
131
                                                page={page}
142
                                                    page={page}
132
                                                setPage={setPage}
143
                                                    setPage={setPage}
133
                                                total={test.content.length}
144
                                                    total={test.content.length}
134
                                                backendVars={backendVars}
145
                                                    backendVars={backendVars}
135
                                                handleAnswer={handleAnswer}
146
                                                    handleAnswer={handleAnswer}
136
                                            />
147
                                                />)
137
                                        })}
148
                                        })}
138
                                    </div>
149
                                    </div>
139
                                </div>)}
150
                                </div>
-
 
151
                            )}
140
                            <div className="col-md-12 col-sm-12 col-xs-12 text-right">
152
                            <div className="col-md-12 col-sm-12 col-xs-12 text-right">
141
                                <div className="company-title">
153
                                <div className="company-title">
142
                                    <button
154
                                    <button
143
                                        type="button"
155
                                        type="button"
144
                                        className="btn btn-secondary"
156
                                        className="btn btn-secondary"
145
                                        onClick={handleConfirmationBoxShow}>
157
                                        onClick={handleConfirmationBoxShow}>
146
                                        {backendVars.LBL_CANCEL}
158
                                        {backendVars.LBL_CANCEL}
147
                                    </button>
159
                                    </button>
148
 
-
 
149
                                    <ConfirmationBox
160
                                    <ConfirmationBox
150
                                        show={confirmationBoxShow}
161
                                        show={confirmationBoxShow}
151
                                        onClose={handleConfirmationBoxShow}
162
                                        onClose={handleConfirmationBoxShow}
152
                                        onAccept={handleCancel}
163
                                        onAccept={handleCancel}
153
                                    />
164
                                    />
154
 
-
 
155
 
-
 
156
                                    <button
165
                                    <button
157
                                        type="buttton"
166
                                        type="buttton"
158
                                        className="btn btn-primary"
167
                                        className="btn btn-primary"
159
                                        disabled={!valid}
168
                                        disabled={!valid}
160
                                        onClick={() => handleSubmit()}>
169
                                        onClick={() => handleSubmit()}>
Línea 163... Línea 172...
163
                                </div>
172
                                </div>
164
                            </div>
173
                            </div>
165
                        </div>
174
                        </div>
166
                    ) : (
175
                    ) : (
167
                        <div className="row">
176
                        <div className="row">
-
 
177
                            <div class="company-title text-center">
-
 
178
                                <div class="section_admin_title_buttons">
-
 
179
                                    <h1 class="title">{backendVars.LABEL_SUCCESS_SELF_EVALUATION}  </h1>
-
 
180
                                </div>
-
 
181
                            </div>
168
                            <div className="col-md-12 col-sm-12 col-xs-12">
182
                            <div className="col-md-12 col-sm-12 col-xs-12 text-center">
-
 
183
                                <br />
-
 
184
                                <button
169
                                <h2>Su prueba se ha enviado con éxito</h2>
185
                                    className="btn btn-sm btn-primary"
170
                                <a onClick={() => {
186
                                    onClick={() => {
171
                                    setTest(null);
187
                                        setTest(null);
172
                                    setSuccess(false)
188
                                        setSuccess(false)
173
                                }}>{backendVars.LBL_GO_BACK}</a>
189
                                    }}>{backendVars.LBL_GO_BACK}</button>
174
                            </div>
190
                            </div>
175
                        </div>
191
                        </div>
176
                    )}
192
                    )}
177
                </div>
193
                </div>
178
            )}
194
            )}
179
 
-
 
180
 
-
 
181
        </div>
195
        </div>
182
    )
196
    )
183
}
197
}
Línea 184... Línea 198...
184
 
198
 
185
export default Test;
199
export default Test;