Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 9833 Rev 9834
Línea 46... Línea 46...
46
      ...location,
46
      ...location,
47
      last_date: year,
47
      last_date: year,
48
      status: isActive ? "a" : "i"
48
      status: isActive ? "a" : "i"
49
    }
49
    }
Línea 50... Línea 50...
50
 
50
 
51
    if (!location.formatted_address) { return setInputErrors({ ...inputErrors, location: "Empty location" }) }
51
    if (!location.formatted_address) { return console.log("Location empty") }
Línea 52... Línea 52...
52
    if (!year) { return setInputErrors({ ...inputErrors, year: "Empty last day" }) }
52
    if (!year) { return console.log("Year empty") }
53
 
53
 
Línea -... Línea 54...
-
 
54
    console.log(submitData)
-
 
55
  }
-
 
56
 
-
 
57
  useEffect(() => {
54
    console.log(submitData)
58
    console.log(errors)
Línea 55... Línea 59...
55
  }
59
  }, [errors])
56
 
60
 
57
  useEffect(() => register("description"), [])
61
  useEffect(() => register("description"), [])
Línea 74... Línea 78...
74
                type="text"
78
                type="text"
75
                name="name"
79
                name="name"
76
                className="form-control"
80
                className="form-control"
77
                ref={register({ required: true, maxLength: 120 })}
81
                ref={register({ required: true, maxLength: 120 })}
78
              />
82
              />
79
              {errors.name && <p>{errors.name}</p>}
-
 
80
            </div>
83
            </div>
81
            <div className="form-group">
84
            <div className="form-group">
82
              <label>Cargo a evaluar</label>
85
              <label>Cargo a evaluar</label>
83
              <select name="job_description_id" className="form-control" ref={register({ required: true })} onChange={(e) => setJobsDescriptions(e.target.value)}>
86
              <select name="job_description_id" className="form-control" ref={register({ required: true })} onChange={(e) => setJobsDescriptions(e.target.value)}>
84
                {
87
                {
Línea 104... Línea 107...
104
                value={locationLabel}
107
                value={locationLabel}
105
                setValue={setLocationLabel}
108
                setValue={setLocationLabel}
106
                googleApiKey={googleApiKey}
109
                googleApiKey={googleApiKey}
107
                updateData={setLocation}
110
                updateData={setLocation}
108
              />
111
              />
109
              {inputErrors.location && <p>{inputErrors.location}</p>}
-
 
110
            </div>
112
            </div>
111
            <div className="form-group">
113
            <div className="form-group">
112
              <label>Industria</label>
114
              <label>Industria</label>
113
              <select name="industry_id" className="form-control" ref={register({ required: true })} onChange={(e) => setIndustry(e.target.value)}>
115
              <select name="industry_id" className="form-control" ref={register({ required: true })} onChange={(e) => setIndustry(e.target.value)}>
114
                {
116
                {
Línea 127... Línea 129...
127
                  setYear(new Intl.DateTimeFormat({ year: 'numeric', month: 'numeric', day: 'numeric' }).format(e.toDate()))
129
                  setYear(new Intl.DateTimeFormat({ year: 'numeric', month: 'numeric', day: 'numeric' }).format(e.toDate()))
128
                }
130
                }
129
                inputProps={{ className: 'form-control' }}
131
                inputProps={{ className: 'form-control' }}
130
                closeOnSelect
132
                closeOnSelect
131
              />
133
              />
132
              {inputErrors.year && <p>{inputErrors.year}</p>}
-
 
133
            </div>
134
            </div>
134
            <div className="form-group">
135
            <div className="form-group">
135
              <label>Descripción</label>
136
              <label>Descripción</label>
136
              <DescriptionInput
137
              <DescriptionInput
137
                setValue={setValue}
138
                setValue={setValue}