| .. | .. |
|---|
| 36 | 36 | |
|---|
| 37 | 37 | --- |
|---|
| 38 | 38 | |
|---|
| 39 | | -## Step 3: Update ORP Status via API |
|---|
| 39 | +## Step 3: Update ORP Status |
|---|
| 40 | 40 | |
|---|
| 41 | | -Navigate to job-room.ch in Playwright (any page), then use internal API: |
|---|
| 41 | +**Two approaches depending on whether the period has been submitted:** |
|---|
| 42 | + |
|---|
| 43 | +### Option A: API (for unsubmitted periods) |
|---|
| 44 | +Navigate to job-room.ch in Playwright, then use internal API: |
|---|
| 45 | + |
|---|
| 46 | +### Option B: UI clicks (for submitted periods - REQUIRED) |
|---|
| 47 | +The API returns `WORK_EFFORT_ALREADY_SUBMITTED` (400) for entries in periods that have been transmitted. In this case, use the UI: |
|---|
| 48 | + |
|---|
| 49 | +1. Navigate to `https://www.job-room.ch/work-efforts` |
|---|
| 50 | +2. Disable 1Password on all inputs |
|---|
| 51 | +3. Type company name in the search box (slowly: true) |
|---|
| 52 | +4. The matching entry appears with radio buttons: Noch offen / Anstellung / Absage |
|---|
| 53 | +5. Click the "Absage" radio button |
|---|
| 54 | +6. A dialog appears with "Absagegrund" textbox |
|---|
| 55 | +7. Type the rejection reason (e.g. "Absage erhalten am DD.MM.YYYY") |
|---|
| 56 | +8. Click "Speichern" |
|---|
| 57 | + |
|---|
| 58 | +**Always try the API first. If it returns 400 with WORK_EFFORT_ALREADY_SUBMITTED, fall back to UI clicks.** |
|---|
| 59 | + |
|---|
| 60 | +### 3a. Find the work effort (API approach) |
|---|
| 42 | 61 | |
|---|
| 43 | 62 | ### 3a. Find the work effort |
|---|
| 44 | 63 | |
|---|