This commit introduces new capabilities for dynamic forms and refactors related components for improved type safety and data fetching.
- **`src/core/utils/dynamic-field.utils.ts`**:
- Added `Description` and `Required` properties to the `FieldDefinition` interface to allow for more detailed field configurations and validation.
- Narrowed the `Type` property from `number | string` to `number` for stricter type enforcement.
- **`src/core/components/base/form-field.tsx`**:
- Applied non-null assertion operators (`!`) and optional chaining (`?.`) to `field.MinValue`, `field.MaxValue`, `field.Length`, and `field.Type`. This improves type safety and handles cases where these properties might be undefined according to the updated `FieldDefinition`.
- **`src/core/service/api-address.ts`**:
- Added `index2: "workflow/index2"` to `API_ADDRESS` to support a new workflow data endpoint.
- **`src/modules/dashboard/pages/campaigns/detail.tsx`**:
- Updated the campaign detail page to display `campaign.user_id_nickname` instead of `campaign.nickname` for accurate user identification.
- **`src/modules/dashboard/pages/step-form/index.tsx`**:
- Refactored dynamic form data fetching to use `fetchFieldIndex` and `fetchFielSecondeIndex` services.
- Switched from `useParams` to `useSearchParams` for more flexible parameter handling in the step form.