Enhance school simulation management by introducing a new SchoolWeekDays option, allowing configuration of the number of working days in a week. Update the API to include school week days in responses and enhance documentation to reflect these changes. Revise UI components to support the new management features, ensuring a seamless user experience when hiring and assigning staff. Update localization strings for improved clarity and consistency across the application.
This commit is contained in:
+32
-5
@@ -30,13 +30,15 @@ the wire format is unambiguous, and the client formats it back in UTC.
|
||||
|
||||
### `GET /api/schools`
|
||||
|
||||
Everything the main menu needs in one request.
|
||||
Everything the main menu needs in one request. `schoolWeekDays` is 5–7 working days counted
|
||||
from Monday (five is Mon–Fri; six adds Saturday). It is a school rule, not a catalog def.
|
||||
|
||||
```json
|
||||
{
|
||||
"maxSchools": 6,
|
||||
"defaultStartDate": "2012-03-31T06:00:00Z",
|
||||
"gameMinutesPerRealSecond": 5,
|
||||
"schoolWeekDays": 5,
|
||||
"schools": [
|
||||
{ "id": 1, "name": "Гимназия №14", "gameTime": "2012-03-31T07:35:00Z", "running": false, "speedIndex": 1 }
|
||||
]
|
||||
@@ -79,8 +81,15 @@ total is computed on the server.
|
||||
it is independent of the UI language.
|
||||
|
||||
`subjects` is the list of placeable subjects (`defName`, label, `gradeMin`/`gradeMax`,
|
||||
`hoursPerWeek`, and `skills` with shares). The assignment form in a later phase reads it; the
|
||||
create editor does not.
|
||||
`hoursPerWeek`, `skills` with shares, and optional `room`). `room` is the RoomDef the lesson
|
||||
needs — PE uses a gym, informatics a computer lab; omit it and the class homeroom is used.
|
||||
|
||||
`dayFrame` is the one concrete bell schedule (`firstLesson` as `HH:mm`, lesson count and
|
||||
lengths, which break is the long one). `holidays` are month-day ranges that repeat every
|
||||
academic year; a range whose start is after its end wraps across 1 January.
|
||||
|
||||
The assignment form in a later phase reads subjects; the timetable grid reads the day frame.
|
||||
The create editor does not.
|
||||
|
||||
`lang` is the same value Hello carries — not `Accept-Language`. Anything other than `en` is
|
||||
Russian.
|
||||
@@ -245,7 +254,8 @@ when hiring or assigning, not at month end; money itself does not move.
|
||||
"age": 34,
|
||||
"isParent": false,
|
||||
"hourlyWageAsk": 50,
|
||||
"monthlyBase": 4000
|
||||
"monthlyBase": 4000,
|
||||
"skills": [{ "id": "Mathematics", "label": "Математика", "value": "72" }]
|
||||
}
|
||||
],
|
||||
"staff": [
|
||||
@@ -261,13 +271,30 @@ when hiring or assigning, not at month end; money itself does not move.
|
||||
"monthlyPay": 5000,
|
||||
"subjects": [{ "defName": "Mathematics", "label": "Математика" }]
|
||||
}
|
||||
],
|
||||
"positions": [{ "defName": "Teacher", "label": "Учитель" }],
|
||||
"subjects": [
|
||||
{
|
||||
"defName": "Mathematics",
|
||||
"label": "Математика",
|
||||
"gradeMin": 5,
|
||||
"gradeMax": 11,
|
||||
"hoursPerWeek": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Applicants here are the same people as in `saves/{id}.people.json`. A parent keeps the same
|
||||
id on the roster; hiring them sets `isStaff` on that person and does not create a second
|
||||
entity. Generated candidates (`aN.p0`) join the roster only when hired.
|
||||
entity. Generated candidates (`aN.p0`) join the roster only when hired. `skills` on an
|
||||
applicant are the three strongest, for the management list; the full set is on the person
|
||||
card. `positions` and `subjects` are the school's catalog, so the hire and assign pickers
|
||||
do not need a second request.
|
||||
|
||||
`GET /api/schools/{id}/people/{personId}` also opens a card for someone who is only in the
|
||||
applicant pool (needs are the frozen snapshot — they are not in the World yet). Unknown
|
||||
ids that are in neither place stay `404` `unknown-person`.
|
||||
|
||||
### `POST /api/schools/{id}/staff/hire`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user