Skip to content

ORIS entries: complete logic to push all entries to ORIS#33

Open
janzhanal wants to merge 6 commits intoarnost00:masterfrom
janzhanal:feature/oris-entries
Open

ORIS entries: complete logic to push all entries to ORIS#33
janzhanal wants to merge 6 commits intoarnost00:masterfrom
janzhanal:feature/oris-entries

Conversation

@janzhanal
Copy link
Copy Markdown
Contributor

@janzhanal janzhanal commented Mar 13, 2026

Issue #21
Co funguje:

  • prihlaseni na zavod
  • odhlaseni
  • zmena prihlasky
  • odlozeni prihlaseni v pripade, ze prihlasky jeste nejsou otevrene
  • odlozeni v pripade, ze oris neni dostupny

Co je treba dodelat:

  • pocitacove zpracovatelne pozadavky
  • doresit cron job

@arnost00
Copy link
Copy Markdown
Owner

Tesim se na tento merge.
Pripadne to muzeme do hlavniho repa dat jako feature vetev. Abychom se pripadne mohli zapojit dalsi.

@janzhanal
Copy link
Copy Markdown
Contributor Author

Muzu to udelat ja? V praci delam s Gitlabem, ten to ma trosku jinak, tak presne nevim...

Comment thread lib/OrisIntegrationService.php Outdated
if ($si) {
$params['si'] = $si;
}
if ($rentSi) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neni tu potreba osefovat i moznost zmeny pujceni cipu? pokud rentSi == false, tak nastavit rent_si = 0 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spis predchystane, kdyby se to nekdy implementovalo, ted to podle me neni jak pouzit ne?

Comment thread oris_sync_daemon.php Outdated
Comment thread oris_sync_daemon.php Outdated
foreach ($entries as $entry) {
if (isset($entry['ClubUserID']) && $entry['ClubUserID'] == $clubuser) {
$existingEntryId = $entry['ID'];
logMessage(" - Found existing ORIS Entry ID $existingEntryId for clubuser $clubuser during create. Switching to update.");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spis to otocit - napred najit, zda existuje a nasledne se rozhodnout, zda create nebo update, mame tu pak 2x stejny kod jen z druhe strany

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podle me uz obsolete

Comment thread race_regs_1_exc.php
$result=query_db("UPDATE ".TBL_ZAVXUS." SET sync_status='PENDING_DELETE' WHERE id_zavod = '$id' AND id_user = '$user_id'")
or die("Chyba při provádění dotazu do databáze.");
} else {
$result=query_db("DELETE FROM ".TBL_ZAVXUS." WHERE id_zavod = '$id' AND id_user = '$user_id'")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tady bude potreba zkontrolovat, co to udela s financemi!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to by nemelo finance ovlivnit - nelze se odhlasovat po terminu prihlasek

  • ale mohl by to byt corner case - oris te nenecha se odhlasit v druhem terminu, pokud ses prihlasil v prvnim

Comment thread oris_sync_daemon.php
Comment thread oris_sync_daemon.php Outdated
echo $line;
// Log to file in the same directory
file_put_contents(__DIR__ . '/logs/oris_sync.log', $line, FILE_APPEND);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log je pěkný, ale dostane se na něj jen admin serveru. Navíc nevím jak jsou filesystémy odděleny mezi instacemi/oddíly.

Spíš to zajímá správce závodů a ten by to měl najít na stránce závodu a řešit, pokud je to potřeba.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pridano. Mam resit logrotate? @arnost00

Comment thread _SQL/zmeny_3.4.5.658.sql.php Outdated
Comment thread oris_sync_daemon.php Outdated
@janzhanal janzhanal force-pushed the feature/oris-entries branch from 588c1cc to 965ebce Compare March 21, 2026 20:44
@janzhanal
Copy link
Copy Markdown
Contributor Author

Dodal jsem:

  • pristup na logy pro prihlasovatele
  • prepis prihlasky do orisu po kliknuti na odeslat
  • oprava logickych chyb u PENDING
  • poresena pripadna nedostupnost orisu
  • sync_status v db -> enum + index
  • poreseno posilani/neposilani SI (0 v members = pouzij, co ma uzivatel jako default v orisu)
  • reformat, tak aby nebyly dva soubory pro pristup do orisu
  • notifikace, kdyz se prihlaska nepovede (treba spatne zadana kategorie = vubec neprobehne)

Co stale visi:

  • pocitacove zpracovatelne pozadavky
  • cron job (asi nebude treba kazdou minutu)

@janzhanal janzhanal changed the title DRAFT: ORIS entries: complete logic to push all entries to ORIS ORIS entries: complete logic to push all entries to ORIS Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants