Commit 4016d55
committed
refactor: deduplicate AdminProfile, type-safe form hooks
- Extract shared AdminProfileForm component for Create/Update
- Move selfOnboarding into employee details schema
- Preserve schema types through HookResult for typed watch
- Centralize schema type aliases in each schema file
- Add dedicated create/update hooks with self-fetching
- Make field components self-translating via i18n
- Add field name/metadata exports for react-hook-form
- Derive home address state options from schema
Made-with: Cursor1 parent e1611b3 commit 4016d55
30 files changed
Lines changed: 1098 additions & 743 deletions
File tree
- docs/reference
- src
- components/Employee
- UNSTABLE_AdminProfile
- UNSTABLE_EmployeeDetailsForm
- UNSTABLE_EmployeeHomeAddressForm
- UNSTABLE_EmployeeProfile
- UNSTABLE_EmployeeWorkAddressForm
- helpers
- i18n/en
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | 750 | | |
759 | 751 | | |
760 | 752 | | |
761 | 753 | | |
762 | 754 | | |
763 | 755 | | |
764 | | - | |
| 756 | + | |
765 | 757 | | |
766 | 758 | | |
767 | 759 | | |
768 | 760 | | |
769 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
770 | 766 | | |
771 | 767 | | |
772 | 768 | | |
| |||
781 | 777 | | |
782 | 778 | | |
783 | 779 | | |
784 | | - | |
| 780 | + | |
785 | 781 | | |
786 | 782 | | |
787 | 783 | | |
788 | 784 | | |
789 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | 802 | | |
811 | 803 | | |
812 | 804 | | |
| |||
816 | 808 | | |
817 | 809 | | |
818 | 810 | | |
819 | | - | |
| 811 | + | |
820 | 812 | | |
821 | 813 | | |
822 | | - | |
823 | | - | |
| 814 | + | |
| 815 | + | |
824 | 816 | | |
825 | 817 | | |
826 | | - | |
| 818 | + | |
827 | 819 | | |
828 | 820 | | |
829 | 821 | | |
830 | 822 | | |
831 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
832 | 828 | | |
833 | 829 | | |
834 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 152 | + | |
| 153 | + | |
155 | 154 | | |
156 | 155 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 156 | + | |
160 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | 162 | | |
| 163 | + | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
| |||
0 commit comments