Wizard güncellemeleri
This commit is contained in:
parent
b7092cf9cc
commit
79c72430ab
7 changed files with 337 additions and 90 deletions
|
|
@ -12,6 +12,13 @@ public class ListFormWizardDto
|
||||||
|
|
||||||
public bool IsTenant { get; set; }
|
public bool IsTenant { get; set; }
|
||||||
public bool IsBranch { get; set; }
|
public bool IsBranch { get; set; }
|
||||||
|
public bool IsOrganizationUnit { get; set; }
|
||||||
|
|
||||||
|
public bool AllowAdding { get; set; }
|
||||||
|
public bool AllowEditing { get; set; }
|
||||||
|
public bool AllowDeleting { get; set; }
|
||||||
|
public bool AllowDetail { get; set; }
|
||||||
|
public bool ConfirmDelete { get; set; }
|
||||||
|
|
||||||
public string LanguageTextMenuEn { get; set; }
|
public string LanguageTextMenuEn { get; set; }
|
||||||
public string LanguageTextMenuTr { get; set; }
|
public string LanguageTextMenuTr { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ public class ListFormWizardAppService(
|
||||||
DataSourceCode = input.DataSourceCode,
|
DataSourceCode = input.DataSourceCode,
|
||||||
IsTenant = input.IsTenant,
|
IsTenant = input.IsTenant,
|
||||||
IsBranch = input.IsBranch,
|
IsBranch = input.IsBranch,
|
||||||
IsOrganizationUnit = false,
|
IsOrganizationUnit = input.IsOrganizationUnit,
|
||||||
SelectCommandType = input.SelectCommandType,
|
SelectCommandType = input.SelectCommandType,
|
||||||
SelectCommand = input.SelectCommand,
|
SelectCommand = input.SelectCommand,
|
||||||
KeyFieldName = input.KeyFieldName,
|
KeyFieldName = input.KeyFieldName,
|
||||||
|
|
@ -215,7 +215,7 @@ public class ListFormWizardAppService(
|
||||||
DeleteCommand = Wizard.DefaultDeleteCommand(nameof(TableNameEnum.Country)),
|
DeleteCommand = Wizard.DefaultDeleteCommand(nameof(TableNameEnum.Country)),
|
||||||
DeleteFieldsDefaultValueJson = Wizard.DefaultDeleteFieldsDefaultValueJson(input.KeyFieldDbSourceType),
|
DeleteFieldsDefaultValueJson = Wizard.DefaultDeleteFieldsDefaultValueJson(input.KeyFieldDbSourceType),
|
||||||
PagerOptionJson = Wizard.DefaultPagerOptionJson,
|
PagerOptionJson = Wizard.DefaultPagerOptionJson,
|
||||||
EditingOptionJson = Wizard.DefaultEditingOptionJson(titleLangKey, 600, 500, true, true, true, true, false),
|
EditingOptionJson = Wizard.DefaultEditingOptionJson(titleLangKey, 600, 500, input.AllowDeleting, input.AllowAdding, input.AllowEditing, input.ConfirmDelete, false, input.AllowDetail),
|
||||||
EditingFormJson = editingFormDtos.Count > 0 ? JsonSerializer.Serialize(editingFormDtos) : null,
|
EditingFormJson = editingFormDtos.Count > 0 ? JsonSerializer.Serialize(editingFormDtos) : null,
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3183,8 +3183,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListForm.GridMenu",
|
"key": "ListForms.ListForm.GridMenu",
|
||||||
"en": "Menu",
|
"en": "MENU",
|
||||||
"tr": "Menü"
|
"tr": "MENÜ"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -15764,42 +15764,6 @@
|
||||||
"en": "Deploy",
|
"en": "Deploy",
|
||||||
"tr": "Dağıtım"
|
"tr": "Dağıtım"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Listforms.Wizard",
|
|
||||||
"en": "List Form Wizard",
|
|
||||||
"tr": "Liste Form Sihirbazı"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.Wizard.MenuInfo",
|
|
||||||
"en": "Menu Information",
|
|
||||||
"tr": "Menü Bilgileri"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.Wizard.ListFormSettings",
|
|
||||||
"en": "List Form Settings",
|
|
||||||
"tr": "Liste Form Ayarları"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.Wizard.ListFormFields",
|
|
||||||
"en": "List Form Fields",
|
|
||||||
"tr": "Liste Form Alanları"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.Wizard.Deploy",
|
|
||||||
"en": "Deploy",
|
|
||||||
"tr": "Yayınla"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.FormBilgileriKaydedildi",
|
|
||||||
"en": "Form Information Saved",
|
|
||||||
"tr": "Form Bilgileri Kaydedildi"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "Back",
|
"key": "Back",
|
||||||
|
|
@ -15818,6 +15782,12 @@
|
||||||
"en": "Helper Codes",
|
"en": "Helper Codes",
|
||||||
"tr": "Yardımcı Kodlar"
|
"tr": "Yardımcı Kodlar"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step1.WizardNameHint",
|
||||||
|
"en": "Used to generate ListForm Code and Menu Code",
|
||||||
|
"tr": "ListForm Kodu ve Menü Kodu oluşturmak için kullanılır"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step1.WizardName",
|
"key": "ListForms.Wizard.Step1.WizardName",
|
||||||
|
|
@ -15890,6 +15860,24 @@
|
||||||
"en": "Delete",
|
"en": "Delete",
|
||||||
"tr": "Sil"
|
"tr": "Sil"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step1.MenuCodeHint",
|
||||||
|
"en": "Auto-derived, editable",
|
||||||
|
"tr": "Otomatik oluşturulur, düzenlenebilir"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Add",
|
||||||
|
"en": "Add",
|
||||||
|
"tr": "Ekle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.ClearSelection",
|
||||||
|
"en": "Clear Selection",
|
||||||
|
"tr": "Seçimi Temizle"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step2.ListFormCode",
|
"key": "ListForms.Wizard.Step2.ListFormCode",
|
||||||
|
|
@ -15920,6 +15908,30 @@
|
||||||
"en": "Key Field Name",
|
"en": "Key Field Name",
|
||||||
"tr": "Anahtar Alan Adı"
|
"tr": "Anahtar Alan Adı"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.SelectAll",
|
||||||
|
"en": "Select All",
|
||||||
|
"tr": "Tümünü Seç"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.ClearAll",
|
||||||
|
"en": "Clear All",
|
||||||
|
"tr": "Tümünü Temizle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.ListFormCodeHint",
|
||||||
|
"en": "Auto-derived from Wizard Name, editable",
|
||||||
|
"tr": "Sihirbaz Adından Otomatik Oluşturulur, Düzenlenebilir"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.Columns",
|
||||||
|
"en": "Columns",
|
||||||
|
"tr": "Sütunlar"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step2.IsTenant",
|
"key": "ListForms.Wizard.Step2.IsTenant",
|
||||||
|
|
@ -15932,6 +15944,72 @@
|
||||||
"en": "Is Branch?",
|
"en": "Is Branch?",
|
||||||
"tr": "Şubeye Özgü?"
|
"tr": "Şubeye Özgü?"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.IsOrganizationUnit",
|
||||||
|
"en": "Is Organization Unit?",
|
||||||
|
"tr": "Kurumsal Birime Özgü?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.AllowAdding",
|
||||||
|
"en": "Allow Adding?",
|
||||||
|
"tr": "Ekleme İzni?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.AllowEditing",
|
||||||
|
"en": "Allow Editing?",
|
||||||
|
"tr": "Düzenleme İzni?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.AllowDeleting",
|
||||||
|
"en": "Allow Deleting?",
|
||||||
|
"tr": "Silme İzni?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.AllowDetail",
|
||||||
|
"en": "Allow Detail?",
|
||||||
|
"tr": "Detay İzni?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.ConfirmDelete",
|
||||||
|
"en": "Confirm Delete?",
|
||||||
|
"tr": "Silme Onayı?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.ColumnSelection",
|
||||||
|
"en": "Column Selection",
|
||||||
|
"tr": "Sütun Seçimi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.Tables",
|
||||||
|
"en": "Tables",
|
||||||
|
"tr": "Tablolar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.StoredProcedures",
|
||||||
|
"en": "Stored Procedures",
|
||||||
|
"tr": "Depolmuş Yordamlar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.Views",
|
||||||
|
"en": "Views",
|
||||||
|
"tr": "Görünümler"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.Functions",
|
||||||
|
"en": "Functions",
|
||||||
|
"tr": "Fonksiyonlar"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step2.TitleTextEnglish",
|
"key": "ListForms.Wizard.Step2.TitleTextEnglish",
|
||||||
|
|
@ -15980,6 +16058,36 @@
|
||||||
"en": "Span",
|
"en": "Span",
|
||||||
"tr": "Genişlik"
|
"tr": "Genişlik"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step3.Cols",
|
||||||
|
"en": "Columns",
|
||||||
|
"tr": "Sütun Sayısı"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step3.AddGroup",
|
||||||
|
"en": "Add Group",
|
||||||
|
"tr": "Grup Ekle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step3.AddAll",
|
||||||
|
"en": "Add All",
|
||||||
|
"tr": "Tümünü Ekle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step3.NoGroupsYet",
|
||||||
|
"en": "No Groups Yet",
|
||||||
|
"tr": "Henüz Grup Yok"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step3.AllColumnsAdded",
|
||||||
|
"en": "All Columns Added",
|
||||||
|
"tr": "Tüm Sütunlar Eklendi"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step3.Remove",
|
"key": "ListForms.Wizard.Step3.Remove",
|
||||||
|
|
@ -16148,6 +16256,18 @@
|
||||||
"en": "Column",
|
"en": "Column",
|
||||||
"tr": "Sütun"
|
"tr": "Sütun"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step4.DeployAndSave",
|
||||||
|
"en": "Deploy And Save",
|
||||||
|
"tr": "Deploy Et ve Kaydet"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step4.AllInfoReady",
|
||||||
|
"en": "All Information Is Ready",
|
||||||
|
"tr": "Tüm Bilgiler Hazır"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.Wizard.Step4.DeployLog",
|
"key": "ListForms.Wizard.Step4.DeployLog",
|
||||||
|
|
@ -16219,6 +16339,30 @@
|
||||||
"key": "ListForms.Wizard.Step4.Log.Completed",
|
"key": "ListForms.Wizard.Step4.Log.Completed",
|
||||||
"en": "Completed ✓",
|
"en": "Completed ✓",
|
||||||
"tr": "Tamamlandı ✓"
|
"tr": "Tamamlandı ✓"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step4.Log.SelectIcon",
|
||||||
|
"en": "Select icon... ✓",
|
||||||
|
"tr": "İkon seç... ✓"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step1.SelectIcon",
|
||||||
|
"en": "Select icon...",
|
||||||
|
"tr": "İkon seç..."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.Loading",
|
||||||
|
"en": "Loading...",
|
||||||
|
"tr": "Yükleniyor..."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.Wizard.Step2.SelectKeyColumn",
|
||||||
|
"en": "Select key column",
|
||||||
|
"tr": "Anahtar sütunu seç"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -37,6 +37,12 @@ export interface ListFormWizardDto {
|
||||||
menuCode: string
|
menuCode: string
|
||||||
isTenant: boolean
|
isTenant: boolean
|
||||||
isBranch: boolean
|
isBranch: boolean
|
||||||
|
isOrganizationUnit: boolean
|
||||||
|
allowAdding: boolean
|
||||||
|
allowEditing: boolean
|
||||||
|
allowDeleting: boolean
|
||||||
|
confirmDelete: boolean
|
||||||
|
allowDetail: boolean
|
||||||
languageTextMenuEn: string
|
languageTextMenuEn: string
|
||||||
languageTextMenuTr: string
|
languageTextMenuTr: string
|
||||||
languageTextTitleEn: string
|
languageTextTitleEn: string
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,12 @@ const initialValues: ListFormWizardDto = {
|
||||||
menuCode: '',
|
menuCode: '',
|
||||||
isTenant: false,
|
isTenant: false,
|
||||||
isBranch: false,
|
isBranch: false,
|
||||||
|
isOrganizationUnit: false,
|
||||||
|
allowAdding: true,
|
||||||
|
allowEditing: true,
|
||||||
|
allowDeleting: true,
|
||||||
|
confirmDelete: true,
|
||||||
|
allowDetail: false,
|
||||||
languageTextMenuEn: '',
|
languageTextMenuEn: '',
|
||||||
languageTextMenuTr: '',
|
languageTextMenuTr: '',
|
||||||
languageTextTitleEn: '',
|
languageTextTitleEn: '',
|
||||||
|
|
@ -79,6 +85,11 @@ const step2ValidationSchema = Yup.object().shape({
|
||||||
keyFieldDbSourceType: Yup.number().required(),
|
keyFieldDbSourceType: Yup.number().required(),
|
||||||
isTenant: Yup.boolean(),
|
isTenant: Yup.boolean(),
|
||||||
isBranch: Yup.boolean(),
|
isBranch: Yup.boolean(),
|
||||||
|
isOrganizationUnit: Yup.boolean(),
|
||||||
|
allowAdding: Yup.boolean(),
|
||||||
|
allowEditing: Yup.boolean(),
|
||||||
|
allowDeleting: Yup.boolean(),
|
||||||
|
confirmDelete: Yup.boolean(),
|
||||||
})
|
})
|
||||||
|
|
||||||
const listFormValidationSchema = step1ValidationSchema.concat(step2ValidationSchema)
|
const listFormValidationSchema = step1ValidationSchema.concat(step2ValidationSchema)
|
||||||
|
|
|
||||||
|
|
@ -394,6 +394,7 @@ function IconPickerField({ value, onChange, invalid }: IconPickerFieldProps) {
|
||||||
: ALL_ICON_ENTRIES
|
: ALL_ICON_ENTRIES
|
||||||
const displayed = filtered.slice(0, limit)
|
const displayed = filtered.slice(0, limit)
|
||||||
const hasMore = displayed.length < filtered.length
|
const hasMore = displayed.length < filtered.length
|
||||||
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLimit(ICON_PAGE_SIZE)
|
setLimit(ICON_PAGE_SIZE)
|
||||||
|
|
@ -422,7 +423,7 @@ function IconPickerField({ value, onChange, invalid }: IconPickerFieldProps) {
|
||||||
<span className="text-xs text-gray-500 truncate">{value}</span>
|
<span className="text-xs text-gray-500 truncate">{value}</span>
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-gray-400 flex-1">Select icon...</span>
|
<span className="text-gray-400 flex-1">{translate('::ListForms.Wizard.Step1.SelectIcon') || 'Select icon...'}</span>
|
||||||
)}
|
)}
|
||||||
<FaChevronDown
|
<FaChevronDown
|
||||||
className={`text-gray-400 text-xs transition-transform ${open ? 'rotate-180' : ''}`}
|
className={`text-gray-400 text-xs transition-transform ${open ? 'rotate-180' : ''}`}
|
||||||
|
|
@ -436,7 +437,7 @@ function IconPickerField({ value, onChange, invalid }: IconPickerFieldProps) {
|
||||||
autoFocus
|
autoFocus
|
||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
placeholder="Search icons… (e.g. FaHome, FcSettings)"
|
placeholder="Search icons… (FaHome, FcSettings)"
|
||||||
className="flex-1 px-2 py-1.5 text-sm rounded border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 outline-none focus:border-indigo-400"
|
className="flex-1 px-2 py-1.5 text-sm rounded border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 outline-none focus:border-indigo-400"
|
||||||
/>
|
/>
|
||||||
<span className="text-xs text-gray-400 shrink-0">{filtered.length} icons</span>
|
<span className="text-xs text-gray-400 shrink-0">{filtered.length} icons</span>
|
||||||
|
|
@ -761,7 +762,7 @@ const WizardStep1 = ({
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
placeholder="e.g. Routes, Products, Orders"
|
placeholder="Routes, Products, Orders"
|
||||||
value={wizardName}
|
value={wizardName}
|
||||||
autoFocus
|
autoFocus
|
||||||
onChange={(e) => onWizardNameChange(e.target.value.replace(/\s/g, ''))}
|
onChange={(e) => onWizardNameChange(e.target.value.replace(/\s/g, ''))}
|
||||||
|
|
@ -851,7 +852,7 @@ const WizardStep1 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="menuCode"
|
name="menuCode"
|
||||||
placeholder="e.g. App.Wizard.Routes, App.Wizard.Products, App.Wizard.Orders"
|
placeholder="App.Wizard.Routes, App.Wizard.Products, App.Wizard.Orders"
|
||||||
component={Input}
|
component={Input}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
|
|
@ -886,7 +887,7 @@ const WizardStep1 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextMenuEn"
|
name="languageTextMenuEn"
|
||||||
placeholder={translate('::ListForms.Wizard.Step1.EnglishMenuTextPlaceholder') || 'English Menu Text'}
|
placeholder={translate('::ListForms.Wizard.Step1.DisplayNameEnglish') || 'English Menu Text'}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -902,7 +903,7 @@ const WizardStep1 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextMenuTr"
|
name="languageTextMenuTr"
|
||||||
placeholder={translate('::ListForms.Wizard.Step1.TurkishMenuTextPlaceholder') || 'Turkish Menu Text'}
|
placeholder={translate('::ListForms.Wizard.Step1.DisplayNameTurkish') || 'Turkish Menu Text'}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ const WizardStep2 = ({
|
||||||
!values.languageTextDescTr && translate('::ListForms.Wizard.Step2.DescriptionTextTurkish'),
|
!values.languageTextDescTr && translate('::ListForms.Wizard.Step2.DescriptionTextTurkish'),
|
||||||
!values.languageTextTitleEn && translate('::ListForms.Wizard.Step2.TitleTextEnglish'),
|
!values.languageTextTitleEn && translate('::ListForms.Wizard.Step2.TitleTextEnglish'),
|
||||||
!values.languageTextTitleTr && translate('::ListForms.Wizard.Step2.TitleTextTurkish'),
|
!values.languageTextTitleTr && translate('::ListForms.Wizard.Step2.TitleTextTurkish'),
|
||||||
selectedColumns.size === 0 && (translate('::ListForms.Wizard.Step2.ColumnSelection') || 'Sütun seçimi'),
|
selectedColumns.size === 0 &&
|
||||||
|
(translate('::ListForms.Wizard.Step2.ColumnSelection') || 'Sütun seçimi'),
|
||||||
].filter(Boolean) as string[]
|
].filter(Boolean) as string[]
|
||||||
const step2CanGo = step2Missing.length === 0
|
const step2CanGo = step2Missing.length === 0
|
||||||
|
|
||||||
|
|
@ -85,7 +86,8 @@ const WizardStep2 = ({
|
||||||
asterisk={true}
|
asterisk={true}
|
||||||
extra={
|
extra={
|
||||||
<span className="text-xs ml-2 text-gray-400">
|
<span className="text-xs ml-2 text-gray-400">
|
||||||
{translate('::ListForms.Wizard.Step2.ListFormCodeHint') || 'Auto-derived from Wizard Name, editable'}
|
{translate('::ListForms.Wizard.Step2.ListFormCodeHint') ||
|
||||||
|
'Auto-derived from Wizard Name, editable'}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -93,7 +95,7 @@ const WizardStep2 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="listFormCode"
|
name="listFormCode"
|
||||||
placeholder="e.g. App.Wizard.Routes"
|
placeholder="App.Wizard.Routes"
|
||||||
component={Input}
|
component={Input}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
|
|
@ -126,9 +128,7 @@ const WizardStep2 = ({
|
||||||
const val = option?.value ?? ''
|
const val = option?.value ?? ''
|
||||||
form.setFieldValue(field.name, val)
|
form.setFieldValue(field.name, val)
|
||||||
onDataSourceSelect(val)
|
onDataSourceSelect(val)
|
||||||
onDataSourceNewChange(
|
onDataSourceNewChange(!!val && !dataSourceList.some((a) => a.value === val))
|
||||||
!!val && !dataSourceList.some((a) => a.value === val),
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
@ -162,9 +162,8 @@ const WizardStep2 = ({
|
||||||
extra={
|
extra={
|
||||||
values.selectCommandType ? (
|
values.selectCommandType ? (
|
||||||
<span className="ml-2 text-xs px-2 py-0.5 rounded bg-indigo-100 text-indigo-600 dark:bg-indigo-900/40 dark:text-indigo-300">
|
<span className="ml-2 text-xs px-2 py-0.5 rounded bg-indigo-100 text-indigo-600 dark:bg-indigo-900/40 dark:text-indigo-300">
|
||||||
{selectCommandTypeOptions.find(
|
{selectCommandTypeOptions.find((o: any) => o.value === values.selectCommandType)
|
||||||
(o: any) => o.value === values.selectCommandType,
|
?.label ?? String(values.selectCommandType)}
|
||||||
)?.label ?? String(values.selectCommandType)}
|
|
||||||
</span>
|
</span>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +183,9 @@ const WizardStep2 = ({
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: translate('::ListForms.Wizard.Step2.StoredProcedures') || 'Stored Procedures',
|
label:
|
||||||
|
translate('::ListForms.Wizard.Step2.StoredProcedures') ||
|
||||||
|
'Stored Procedures',
|
||||||
options: dbObjects.storedProcedures.map((p) => ({
|
options: dbObjects.storedProcedures.map((p) => ({
|
||||||
label: p.procedureName,
|
label: p.procedureName,
|
||||||
value: p.procedureName,
|
value: p.procedureName,
|
||||||
|
|
@ -222,7 +223,12 @@ const WizardStep2 = ({
|
||||||
isClearable
|
isClearable
|
||||||
isLoading={isLoadingDbObjects}
|
isLoading={isLoadingDbObjects}
|
||||||
options={grouped}
|
options={grouped}
|
||||||
placeholder={isLoadingDbObjects ? (translate('::ListForms.Wizard.Step2.Loading') || 'Loading…') : (translate('::ListForms.Wizard.Step2.SelectCommandPlaceholder') || 'Tablo/View/SP seç veya SQL yaz…')}
|
placeholder={
|
||||||
|
isLoadingDbObjects
|
||||||
|
? translate('::ListForms.Wizard.Step2.Loading') || 'Loading…'
|
||||||
|
: translate('::ListForms.Wizard.Step2.SelectCommand') ||
|
||||||
|
'Tablo/View/SP seç veya SQL yaz…'
|
||||||
|
}
|
||||||
value={field.value ? { label: field.value, value: field.value } : null}
|
value={field.value ? { label: field.value, value: field.value } : null}
|
||||||
onChange={(option: any) => {
|
onChange={(option: any) => {
|
||||||
if (!option) {
|
if (!option) {
|
||||||
|
|
@ -282,7 +288,11 @@ const WizardStep2 = ({
|
||||||
form={form}
|
form={form}
|
||||||
isClearable
|
isClearable
|
||||||
isLoading={isLoadingColumns}
|
isLoading={isLoadingColumns}
|
||||||
placeholder={isLoadingColumns ? (translate('::ListForms.Wizard.Step2.ColumnsLoading') || 'Sütunlar yükleniyor…') : (translate('::ListForms.Wizard.Step2.SelectKeyColumn') || 'Key sütunu seç…')}
|
placeholder={
|
||||||
|
isLoadingColumns
|
||||||
|
? translate('::ListForms.Wizard.Step2.ColumnsLoading') || 'Sütunlar yükleniyor…'
|
||||||
|
: translate('::ListForms.Wizard.Step2.SelectKeyColumn') || 'Key sütunu seç…'
|
||||||
|
}
|
||||||
options={selectCommandColumns.map((c) => ({
|
options={selectCommandColumns.map((c) => ({
|
||||||
label: `${c.columnName} (${c.dataType})`,
|
label: `${c.columnName} (${c.dataType})`,
|
||||||
value: c.columnName,
|
value: c.columnName,
|
||||||
|
|
@ -309,32 +319,80 @@ const WizardStep2 = ({
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
|
||||||
<FormItem
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-6">
|
||||||
label={translate('::ListForms.Wizard.Step2.IsTenant')}
|
<div className="flex flex-wrap gap-6">
|
||||||
invalid={!!(errors.isTenant && touched.isTenant)}
|
<FormItem
|
||||||
errorMessage={errors.isTenant}
|
label={translate('::ListForms.Wizard.Step2.IsTenant')}
|
||||||
>
|
invalid={!!(errors.isTenant && touched.isTenant)}
|
||||||
<Field
|
errorMessage={errors.isTenant}
|
||||||
type="checkbox"
|
>
|
||||||
autoComplete="off"
|
<Field type="checkbox" autoComplete="off" name="isTenant" component={Checkbox} />
|
||||||
name="isTenant"
|
</FormItem>
|
||||||
component={Checkbox}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
label={translate('::ListForms.Wizard.Step2.IsBranch')}
|
label={translate('::ListForms.Wizard.Step2.IsBranch')}
|
||||||
invalid={!!(errors.isBranch && touched.isBranch)}
|
invalid={!!(errors.isBranch && touched.isBranch)}
|
||||||
errorMessage={errors.isBranch}
|
errorMessage={errors.isBranch}
|
||||||
>
|
>
|
||||||
<Field
|
<Field type="checkbox" autoComplete="off" name="isBranch" component={Checkbox} />
|
||||||
type="checkbox"
|
</FormItem>
|
||||||
autoComplete="off"
|
|
||||||
name="isBranch"
|
<FormItem
|
||||||
component={Checkbox}
|
label={translate('::ListForms.Wizard.Step2.IsOrganizationUnit')}
|
||||||
/>
|
invalid={!!(errors.isOrganizationUnit && touched.isOrganizationUnit)}
|
||||||
</FormItem>
|
errorMessage={errors.isOrganizationUnit}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="checkbox"
|
||||||
|
autoComplete="off"
|
||||||
|
name="isOrganizationUnit"
|
||||||
|
component={Checkbox}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-6">
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.Wizard.Step2.AllowAdding')}
|
||||||
|
invalid={!!(errors.allowAdding && touched.allowAdding)}
|
||||||
|
errorMessage={errors.allowAdding}
|
||||||
|
>
|
||||||
|
<Field type="checkbox" autoComplete="off" name="allowAdding" component={Checkbox} />
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.Wizard.Step2.AllowEditing')}
|
||||||
|
invalid={!!(errors.allowEditing && touched.allowEditing)}
|
||||||
|
errorMessage={errors.allowEditing}
|
||||||
|
>
|
||||||
|
<Field type="checkbox" autoComplete="off" name="allowEditing" component={Checkbox} />
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.Wizard.Step2.AllowDeleting')}
|
||||||
|
invalid={!!(errors.allowDeleting && touched.allowDeleting)}
|
||||||
|
errorMessage={errors.allowDeleting}
|
||||||
|
>
|
||||||
|
<Field type="checkbox" autoComplete="off" name="allowDeleting" component={Checkbox} />
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.Wizard.Step2.ConfirmDelete')}
|
||||||
|
invalid={!!(errors.confirmDelete && touched.confirmDelete)}
|
||||||
|
errorMessage={errors.confirmDelete}
|
||||||
|
>
|
||||||
|
<Field type="checkbox" autoComplete="off" name="confirmDelete" component={Checkbox} />
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.Wizard.Step2.AllowDetail')}
|
||||||
|
invalid={!!(errors.allowDetail && touched.allowDetail)}
|
||||||
|
errorMessage={errors.allowDetail}
|
||||||
|
>
|
||||||
|
<Field type="checkbox" autoComplete="off" name="allowDetail" component={Checkbox} />
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-6">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-6">
|
||||||
|
|
@ -348,7 +406,9 @@ const WizardStep2 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextTitleEn"
|
name="languageTextTitleEn"
|
||||||
placeholder={translate('::ListForms.Wizard.Step2.EnglishTitlePlaceholder') || 'English Title Text'}
|
placeholder={
|
||||||
|
translate('::ListForms.Wizard.Step2.TitleTextEnglish') || 'English Title Text'
|
||||||
|
}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -363,7 +423,9 @@ const WizardStep2 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextTitleTr"
|
name="languageTextTitleTr"
|
||||||
placeholder={translate('::ListForms.Wizard.Step2.TurkishTitlePlaceholder') || 'Turkish Title Text'}
|
placeholder={
|
||||||
|
translate('::ListForms.Wizard.Step2.TitleTextTurkish') || 'Turkish Title Text'
|
||||||
|
}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -378,7 +440,10 @@ const WizardStep2 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextDescEn"
|
name="languageTextDescEn"
|
||||||
placeholder={translate('::ListForms.Wizard.Step2.EnglishDescPlaceholder') || 'English Description Text'}
|
placeholder={
|
||||||
|
translate('::ListForms.Wizard.Step2.DescriptionTextEnglish') ||
|
||||||
|
'English Description Text'
|
||||||
|
}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -393,7 +458,10 @@ const WizardStep2 = ({
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="languageTextDescTr"
|
name="languageTextDescTr"
|
||||||
placeholder={translate('::ListForms.Wizard.Step2.TurkishDescPlaceholder') || 'Turkish Description Text'}
|
placeholder={
|
||||||
|
translate('::ListForms.Wizard.Step2.DescriptionTextTurkish') ||
|
||||||
|
'Turkish Description Text'
|
||||||
|
}
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -420,7 +488,8 @@ const WizardStep2 = ({
|
||||||
{translate('::ListForms.Wizard.Step2.ClearAll') || 'Tümünü Kaldır'}
|
{translate('::ListForms.Wizard.Step2.ClearAll') || 'Tümünü Kaldır'}
|
||||||
</button>
|
</button>
|
||||||
<span className="text-xs text-gray-400">
|
<span className="text-xs text-gray-400">
|
||||||
{selectedColumns.size}/{selectCommandColumns.length} {translate('::ListForms.Wizard.Step4.StatColumn')}
|
{selectedColumns.size}/{selectCommandColumns.length}{' '}
|
||||||
|
{translate('::ListForms.Wizard.Step4.StatColumn')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : null
|
) : null
|
||||||
|
|
@ -428,10 +497,13 @@ const WizardStep2 = ({
|
||||||
>
|
>
|
||||||
<div className="rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 overflow-hidden">
|
<div className="rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 overflow-hidden">
|
||||||
{isLoadingColumns ? (
|
{isLoadingColumns ? (
|
||||||
<div className="px-4 py-3 text-sm text-gray-400">{translate('::ListForms.Wizard.Step2.ColumnsLoading') || 'Sütunlar yükleniyor…'}</div>
|
<div className="px-4 py-3 text-sm text-gray-400">
|
||||||
|
{translate('::ListForms.Wizard.Step2.ColumnsLoading') || 'Sütunlar yükleniyor…'}
|
||||||
|
</div>
|
||||||
) : selectCommandColumns.length === 0 ? (
|
) : selectCommandColumns.length === 0 ? (
|
||||||
<div className="px-4 py-3 text-sm text-gray-400">
|
<div className="px-4 py-3 text-sm text-gray-400">
|
||||||
{translate('::ListForms.Wizard.Step2.ColumnsWillAppear') || 'Select Command seçilince sütunlar burada görünecek'}
|
{translate('::ListForms.Wizard.Step2.ColumnsWillAppear') ||
|
||||||
|
'Select Command seçilince sütunlar burada görünecek'}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="h-40 overflow-y-auto py-1">
|
<div className="h-40 overflow-y-auto py-1">
|
||||||
|
|
@ -476,7 +548,13 @@ const WizardStep2 = ({
|
||||||
⚠ Zorunlu: {step2Missing.join(', ')}
|
⚠ Zorunlu: {step2Missing.join(', ')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<Button variant="solid" type="button" icon={<FaArrowRight />} disabled={!step2CanGo} onClick={onNext}>
|
<Button
|
||||||
|
variant="solid"
|
||||||
|
type="button"
|
||||||
|
icon={<FaArrowRight />}
|
||||||
|
disabled={!step2CanGo}
|
||||||
|
onClick={onNext}
|
||||||
|
>
|
||||||
{translate('::Next') || 'Next'}
|
{translate('::Next') || 'Next'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue