Add file attachment functionality for equipment management
- Introduced DTO for file attachments with metadata (objectKey, originalFileName, contentType, sizeBytes, downloadUrl). - Updated Equipment DTO to include an optional attachment field. - Implemented endpoints for uploading and deleting equipment attachments. - Enhanced Equipment service to handle file storage and retrieval using S3. - Updated EquipmentEdit, EquipmentList, and EquipmentShow components to support file attachment input and display. - Configured S3 settings in docker-compose and environment files.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { DateInput, Edit, SelectInput, SimpleForm, TextInput as RaTextInput } from 'react-admin';
|
||||
import { EquipmentAttachmentInput } from './EquipmentAttachmentInput';
|
||||
import { equipmentStatusChoices } from './shared';
|
||||
|
||||
const equipmentLabels = {
|
||||
@@ -18,6 +19,7 @@ export function EquipmentEdit() {
|
||||
<RaTextInput source="name" label={equipmentLabels.name} />
|
||||
<RaTextInput source="serialNumber" label={equipmentLabels.serialNumber} />
|
||||
<SelectInput source="status" label={equipmentLabels.status} choices={equipmentStatusChoices} />
|
||||
<EquipmentAttachmentInput />
|
||||
</SimpleForm>
|
||||
</Edit>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user