Merge pull request 'feat: update cat' (#46) from dev into master
Reviewed-on: #46
This commit is contained in:
commit
c032ae81cd
@ -467,11 +467,10 @@ public class MembreService {
|
|||||||
.map(__ -> meData);
|
.map(__ -> meData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 20 16 * * ?")
|
@Scheduled(cron = "0 0 1 1 9 ?")
|
||||||
Uni<Void> everySecond() { // TODO change this
|
Uni<Void> everySeason() {
|
||||||
return repository.list("birth_date IS NOT NULL")
|
return repository.list("birth_date IS NOT NULL")
|
||||||
.chain(l -> Uni.join().all(l.stream().map(m -> {
|
.chain(l -> Uni.join().all(l.stream().map(m -> {
|
||||||
System.out.println("Cat update for " + m.getObjectName());
|
|
||||||
m.setCategorie(Utils.getCategoryFormBirthDate(m.getBirth_date(), new Date()));
|
m.setCategorie(Utils.getCategoryFormBirthDate(m.getBirth_date(), new Date()));
|
||||||
return Panache.withTransaction(() -> repository.persist(m));
|
return Panache.withTransaction(() -> repository.persist(m));
|
||||||
}).toList()).andCollectFailures())
|
}).toList()).andCollectFailures())
|
||||||
|
|||||||
@ -47,6 +47,7 @@ quarkus.rest-client."fr.titionfire.ffsaf.rest.client.SirenService".url=https://d
|
|||||||
#Login
|
#Login
|
||||||
quarkus.oidc.token-state-manager.split-tokens=true
|
quarkus.oidc.token-state-manager.split-tokens=true
|
||||||
quarkus.oidc.token.refresh-expired=true
|
quarkus.oidc.token.refresh-expired=true
|
||||||
|
quarkus.oidc.token.refresh-token-time-skew=1m
|
||||||
|
|
||||||
quarkus.oidc.authentication.redirect-path=/api/auth/login
|
quarkus.oidc.authentication.redirect-path=/api/auth/login
|
||||||
quarkus.oidc.logout.path=/api/logout
|
quarkus.oidc.logout.path=/api/logout
|
||||||
|
|||||||
@ -7,13 +7,13 @@ export function BirthDayField({inti_date, inti_category, required = true}) {
|
|||||||
const [category, setCategory] = useState(inti_category)
|
const [category, setCategory] = useState(inti_category)
|
||||||
const [canUpdate, setCanUpdate] = useState(false)
|
const [canUpdate, setCanUpdate] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const b = category !== getCategoryFormBirthDate(new Date(date), new Date('2023-09-01'))
|
const b = category !== getCategoryFormBirthDate(new Date(date))
|
||||||
if (b !== canUpdate)
|
if (b !== canUpdate)
|
||||||
setCanUpdate(b)
|
setCanUpdate(b)
|
||||||
}, [date, category])
|
}, [date, category])
|
||||||
|
|
||||||
const updateCat = _ => {
|
const updateCat = _ => {
|
||||||
setCategory(getCategoryFormBirthDate(new Date(date), new Date('2023-09-01')))
|
setCategory(getCategoryFormBirthDate(new Date(date)))
|
||||||
}
|
}
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
@ -127,4 +127,4 @@ export const Checkbox = ({label, value, onChange}) => {
|
|||||||
<input className="form-check-input" type="checkbox" id="checkbox1" checked={value} onChange={handleChange}/>
|
<input className="form-check-input" type="checkbox" id="checkbox1" checked={value} onChange={handleChange}/>
|
||||||
<label className="form-check-label" htmlFor="checkbox1">{label}</label>
|
<label className="form-check-label" htmlFor="checkbox1">{label}</label>
|
||||||
</div>
|
</div>
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user