Purpose
Open Administration → Registration Document Rules (/registration/rules). This directory stores parameters for registration document types: name, value type, synchronization flag, registration requirement, upload requirement and changeability.
The current implementation supports creating, editing, deleting and restoring directory records with their parameters. The reviewed registration and document-upload code does not automatically consume these rules. For example, enabling Upload required saves the flag, but does not by itself add an upload field to registration or prevent registration without a file. The guide explains each parameter's intended meaning and verified behavior.
Initial document types
The standard seed data includes four records.
| Document | System slug | Synchronization | Registration required | Upload required | Status / changeable |
|---|---|---|---|---|---|
| Social Card | social-card |
Yes | Yes | Yes | Yes |
| Passport | passport |
No | Yes | Yes | Yes |
| Drivers licence | drivers-licence |
No | Yes | Yes | Yes |
| ID Card | id-card |
No | Yes | Yes | Yes |
All four start with field type text in the database. An institution's actual values may differ after administrative edits. There is no system-slug field in the form.
Rule fields
Click Add or open an existing rule for editing.
| Field | Meaning | Verified behavior |
|---|---|---|
| Name | User-facing document type name. | At least one translation is required, up to 255 characters each; language code up to 10 characters. |
| Field type | Intended type of document number or other value. | The selector offers Numeric, String and Date. Saving sends the selected string. Creation requires a nonempty value of up to 20 characters. This directory does not validate the document number/date itself. |
Document synchronization (synchronization) |
Flag for intended document synchronization. | Stored as a boolean. Saving a rule does not initiate a synchronization operation. |
Registration required (registration_required) |
Whether recording document information is intended to be mandatory. | Stored independently. This module does not automatically validate mandatory student or user registration documents in the current implementation. |
Upload required (upload_required) |
Whether a document file is intended to be mandatory. | Stored independently of the previous setting. There is no file attachment in the rule form, and this directory does not perform upload validation. |
Status (changeable) |
Whether document changes are intended to be allowed. | The displayed switch stores changeable, rather than record deletion or active/inactive state. Turning it off does not remove the rule or lock directory editing. |
All four switches are independent. Creation requires boolean values for each; the backend declares no cross-field conditions. Until a consumer applies these rules in a registration process, these combinations are directory configuration. Set them according to institutional requirements and verify actual enforcement in the relevant process.
The seeded value text is not among the current selector's three options. Treat existing text as a stored value. If changing the type, choose an available option and verify the saved row.
Example
Suppose the institution needs a new document type, Student identifier. The intended requirement is to record its value while leaving a scan optional.
- Open the directory and click Add.
- Enter Student identifier, Russian Студенческий идентификатор and Armenian Ուսանողի նույնացուցիչ.
- Select String, since the identifier may have letters or leading zeroes.
- Enable Registration required, disable Upload required and Document synchronization, and enable Status if changes are intended to be allowed.
- Save. Verify the displayed name, String type and flag values No / Yes / No / Yes.
- Reopen Edit to add another translation when needed.
The result is a saved directory rule. It does not create an individual student's document or automatically change existing user records. To verify enforcement during admission or registration, open that process and examine its available fields and validations.
Edit, search and recover
The table displays name, field type and four flags. Use row actions for edit and delete. The server's table filter catalog supports field type and each boolean parameter, and searches names and field types. Available search/filter controls depend on the shared table UI.
Editing a translation updates or adds the language row without changing the rule ID. Unsubmitted language versions remain stored. Review all four flags when editing other fields.
Deletion moves the rule to the trash. Restore returns the same record with translations. To change intended changeability, use Status; deletion is a separate operation. For a seeded rule, edit the existing record rather than adding another with the same name. A translated name is a display label, not the system ID, and the server declares no global name-uniqueness rule.
Permissions and scope
| Action | Permission |
|---|---|
| Open module and read | Module registration-document-rules, action registration-document-rules.index. |
| Create | registration-document-rules.store. |
| Update | registration-document-rules.update. |
| Delete | registration-document-rules.destroy. |
| Trash | registration-document-rules.deleted-items. |
| Restore | registration-document-rules.restore. |
This is a shared system directory. Its routes declare no faculty, profession or department scope. Permission to edit a rule does not authorize editing another user's personal documents. Manage individual action access in roles.
Common issues
- Rule cannot be saved: check a nonempty name in at least one language, length limits and a selected field type. All four switches must have boolean values, including false.
- Document type missing: check the directory and trash; restoration retains the old ID.
- Add, edit or restore unavailable: check the individual action rights.
- Changing flags has no effect on registration: the current implementation stores the rules, but consumer enforcement in other processes is unverified. Check the deployed version and relevant registration form.
- Saving did not synchronize documents: the switch stores a rule parameter rather than triggering document retrieval or exchange.
Implementation references
- RegistrationDocumentsDescriptor.tsx
- RegistrationDocumentsService.ts
- index.tsx
- api.php
- StoreRegistrationDocumentRuleRequest.php
- UpdateRegistrationDocumentRuleRequest.php
- RegistrationDocumentRuleService.php
- RegistrationDocumentRuleTableRepository.php
- RegistrationDocumentRuleRepository.php
- RegistrationDocumentRule.php
- Seeder: RegistrationDocumentRule.php
- RegistrationDocumentRuleApiTest.php