AOSSIE-Org / AOSSIE-Org/Agora-Blockchain

Feature : Add dynamic candidate management to election creation form

Đang mở
#157 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
97
Fork
199
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Issue Description ✍️

# [Feature] Add Real-Time Candidate Management During Election Creation

## 🚀 Feature Request
Enable adding/editing candidates **directly** in the election creation form instead of requiring a separate step.

## 🤔 Current Problems
1. **Multi-step process**: Users must create election → navigate to dashboard → add candidates
2. **Poor UX**: Forces users to remember candidate details between steps
3. **Time-consuming**: Increases setup time by 3-5x

## 🎯 Desired Behavior
- ➕ **Add candidates dynamically** during form filling
- 🗑️ **Remove candidates** with one click (minimum 2 enforced)
- ✏️ **Edit details** in real-time
- ✅ **Instant validation** for:
- Minimum 2 candidates
- No empty fields
- Unique candidate names

## 📋 Requirements
### Core Functionality
- Unlimited candidate additions
- Intuitive "+ Add Candidate" button
- Delete icon per candidate row
- Real-time save state

### Validation Rules
| Validation | Error Message |
|------------|---------------|
| <2 candidates | "Minimum 2 candidates required" |
| Empty fields | "All candidates need name & description" |
| Duplicate names | "Candidate names must be unique" |

### UI/UX
- Mobile-responsive layout
- Smooth animations for add/remove actions
- Clear error states
- Visual candidate counter

## ✅ Acceptance Criteria
- [ ] Users can add candidates during form filling
- [ ] Minimum 2 candidates enforced
- [ ] All validations provide clear feedback
- [ ] Works on mobile devices
- [ ] Animations don't impact performance

**Labels**: `feature`, `ux`, `high-priority`
**Estimated Effort**: Medium (3-5 hours)

### Record

- [x] I have synced all my node versions as mentioned in the project
- [x] I am using the same version of npm as is the project
- [x] My current branch is in sync with the development branch
- [x] I want to work on this issue

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.