Public sayfa ve menü düzenlemesi
This commit is contained in:
parent
53e0420116
commit
bbc2c9c1cb
10 changed files with 894 additions and 148 deletions
|
|
@ -15539,6 +15539,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -15847,6 +15848,603 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region About Us
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.About))
|
||||||
|
{
|
||||||
|
var listFormAbout = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm
|
||||||
|
{
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Lists.About,
|
||||||
|
Name = AppCodes.About,
|
||||||
|
Title = AppCodes.About,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = false,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = AppCodes.About,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = SelectCommandByTableName("About"),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||||
|
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
|
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||||
|
{
|
||||||
|
Mode = GridOptions.SelectionModeSingle,
|
||||||
|
AllowSelectAll = false
|
||||||
|
}),
|
||||||
|
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
ColumnFixingEnabled = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||||
|
{
|
||||||
|
C = AppCodes.About + ".Create",
|
||||||
|
R = AppCodes.About,
|
||||||
|
U = AppCodes.About + ".Update",
|
||||||
|
D = AppCodes.About + ".Delete",
|
||||||
|
E = AppCodes.About + ".Export",
|
||||||
|
I = AppCodes.About + ".Import"
|
||||||
|
}),
|
||||||
|
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||||
|
{
|
||||||
|
Visible = true,
|
||||||
|
AllowedPageSizes = "10,20,50,100",
|
||||||
|
ShowPageSizeSelector = true,
|
||||||
|
ShowNavigationButtons = true,
|
||||||
|
ShowInfo = false,
|
||||||
|
InfoText = "Page {0} of {1} ({2} items)",
|
||||||
|
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||||
|
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||||
|
LoadPanelEnabled = "auto",
|
||||||
|
LoadPanelText = "Loading..."
|
||||||
|
}),
|
||||||
|
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||||
|
{
|
||||||
|
Popup = new GridEditingPopupDto
|
||||||
|
{
|
||||||
|
Title = "About Form",
|
||||||
|
Width = 800,
|
||||||
|
Height = 600
|
||||||
|
},
|
||||||
|
AllowDeleting = true,
|
||||||
|
AllowAdding = true,
|
||||||
|
AllowUpdating = true,
|
||||||
|
SendOnlyChangedFormValuesUpdate = false
|
||||||
|
}),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||||
|
{
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Order = 1,
|
||||||
|
ColCount = 1,
|
||||||
|
ColSpan = 2,
|
||||||
|
ItemType = "group",
|
||||||
|
Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "StatsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "DescriptionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "SectionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
DeleteCommand = $"UPDATE \"{DbTablePrefix}About\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||||
|
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "DeleterId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
},
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "Id",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@ID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "CreationTime",
|
||||||
|
FieldDbType = DbType.DateTime,
|
||||||
|
Value = "@NOW",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
},
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "CreatorId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#region About Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormAbout.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.About + ".Create",
|
||||||
|
R = AppCodes.About,
|
||||||
|
U = AppCodes.About + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormAbout.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "StatsJson",
|
||||||
|
Width = 400,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.About + ".Create",
|
||||||
|
R = AppCodes.About,
|
||||||
|
U = AppCodes.About + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormAbout.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "DescriptionsJson",
|
||||||
|
Width = 400,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.About + ".Create",
|
||||||
|
R = AppCodes.About,
|
||||||
|
U = AppCodes.About + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormAbout.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "SectionsJson",
|
||||||
|
Width = 400,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.About + ".Create",
|
||||||
|
R = AppCodes.About,
|
||||||
|
U = AppCodes.About + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Contact
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Contact))
|
||||||
|
{
|
||||||
|
var listFormContact = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm
|
||||||
|
{
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Lists.Contact,
|
||||||
|
Name = AppCodes.Contact,
|
||||||
|
Title = AppCodes.Contact,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = false,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = AppCodes.Contact,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = SelectCommandByTableName("Contact"),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||||
|
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
|
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||||
|
{
|
||||||
|
Mode = GridOptions.SelectionModeSingle,
|
||||||
|
AllowSelectAll = false
|
||||||
|
}),
|
||||||
|
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
ColumnFixingEnabled = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
D = AppCodes.Contact + ".Delete",
|
||||||
|
E = AppCodes.Contact + ".Export",
|
||||||
|
I = AppCodes.Contact + ".Import"
|
||||||
|
}),
|
||||||
|
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||||
|
{
|
||||||
|
Visible = true,
|
||||||
|
AllowedPageSizes = "10,20,50,100",
|
||||||
|
ShowPageSizeSelector = true,
|
||||||
|
ShowNavigationButtons = true,
|
||||||
|
ShowInfo = false,
|
||||||
|
InfoText = "Page {0} of {1} ({2} items)",
|
||||||
|
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||||
|
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||||
|
LoadPanelEnabled = "auto",
|
||||||
|
LoadPanelText = "Loading..."
|
||||||
|
}),
|
||||||
|
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||||
|
{
|
||||||
|
Popup = new GridEditingPopupDto
|
||||||
|
{
|
||||||
|
Title = "Contact Form",
|
||||||
|
Width = 800,
|
||||||
|
Height = 600
|
||||||
|
},
|
||||||
|
AllowDeleting = true,
|
||||||
|
AllowAdding = true,
|
||||||
|
AllowUpdating = true,
|
||||||
|
SendOnlyChangedFormValuesUpdate = false
|
||||||
|
}),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||||
|
{
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Order = 1,
|
||||||
|
ColCount = 1,
|
||||||
|
ColSpan = 2,
|
||||||
|
ItemType = "group",
|
||||||
|
Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "Address", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "Phone", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField = "Location", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 6, DataField = "BankJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" },
|
||||||
|
new EditingFormItemDto { Order = 7, DataField = "WorkHoursJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" },
|
||||||
|
new EditingFormItemDto { Order = 8, DataField = "MapJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
DeleteCommand = $"UPDATE \"{DbTablePrefix}Contact\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||||
|
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "DeleterId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
},
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "Id",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@ID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "CreationTime",
|
||||||
|
FieldDbType = DbType.DateTime,
|
||||||
|
Value = "@NOW",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
},
|
||||||
|
new FieldsDefaultValue
|
||||||
|
{
|
||||||
|
FieldName = "CreatorId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#region Contact Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Address",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = lookupQueryLanguageKeyValues
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Phone",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Email",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Location",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "TaxNumber",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "BankJson",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "WorkHoursJson",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listFormContact.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "MapJson",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 9,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
|
{
|
||||||
|
new ValidationRuleDto { Type = "required" }
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Contact + ".Create",
|
||||||
|
R = AppCodes.Contact,
|
||||||
|
U = AppCodes.Contact + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,14 @@
|
||||||
{
|
{
|
||||||
"Name": "App.Services",
|
"Name": "App.Services",
|
||||||
"DisplayName": "App.Services"
|
"DisplayName": "App.Services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "App.About",
|
||||||
|
"DisplayName": "App.About"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "App.Contact",
|
||||||
|
"DisplayName": "App.Contact"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"PermissionDefinitionRecords": [
|
"PermissionDefinitionRecords": [
|
||||||
|
|
@ -2693,6 +2701,104 @@
|
||||||
"DisplayName": "Import",
|
"DisplayName": "Import",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 2
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.About",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About.Create",
|
||||||
|
"ParentName": "App.About",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About.Update",
|
||||||
|
"ParentName": "App.About",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About.Delete",
|
||||||
|
"ParentName": "App.About",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About.Export",
|
||||||
|
"ParentName": "App.About",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.About",
|
||||||
|
"Name": "App.About.Import",
|
||||||
|
"ParentName": "App.About",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.Contact",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact.Create",
|
||||||
|
"ParentName": "App.Contact",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact.Update",
|
||||||
|
"ParentName": "App.Contact",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact.Delete",
|
||||||
|
"ParentName": "App.Contact",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact.Export",
|
||||||
|
"ParentName": "App.Contact",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Contact",
|
||||||
|
"Name": "App.Contact.Import",
|
||||||
|
"ParentName": "App.Contact",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Menus": [
|
"Menus": [
|
||||||
|
|
@ -3048,39 +3154,29 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Public",
|
"ParentCode": "App.Public",
|
||||||
"Code": "App.BlogManagement",
|
"Code": "App.About",
|
||||||
"DisplayName": "App.BlogManagement",
|
"DisplayName": "App.About",
|
||||||
"Order": 1,
|
"Order": 1,
|
||||||
"Url": null,
|
"Url": "/admin/list/list-about",
|
||||||
"Icon": "FcTemplate",
|
"Icon": "FcAbout",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": "App.About",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.BlogManagement",
|
"ParentCode": "App.Public",
|
||||||
"Code": "App.BlogManagement.Category",
|
"Code": "App.Services",
|
||||||
"DisplayName": "App.BlogManagement.Category",
|
"DisplayName": "App.Services",
|
||||||
"Order": 1,
|
|
||||||
"Url": "/admin/list/list-blogcategory",
|
|
||||||
"Icon": "FaCertificate",
|
|
||||||
"RequiredPermissionName": "App.BlogManagement.Category",
|
|
||||||
"IsDisabled": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ParentCode": "App.BlogManagement",
|
|
||||||
"Code": "App.BlogManagement.Posts",
|
|
||||||
"DisplayName": "App.BlogManagement.Posts",
|
|
||||||
"Order": 2,
|
"Order": 2,
|
||||||
"Url": "/admin/list/list-blogpost",
|
"Url": "/admin/list/list-service",
|
||||||
"Icon": "FaWeixin",
|
"Icon": "FcServices",
|
||||||
"RequiredPermissionName": "App.BlogManagement.Posts",
|
"RequiredPermissionName": "App.Services",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Public",
|
"ParentCode": "App.Public",
|
||||||
"Code": "App.Orders",
|
"Code": "App.Orders",
|
||||||
"DisplayName": "App.Orders",
|
"DisplayName": "App.Orders",
|
||||||
"Order": 2,
|
"Order": 3,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcEndCall",
|
"Icon": "FcEndCall",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -3126,11 +3222,41 @@
|
||||||
"RequiredPermissionName": "App.Orders.PurchaseOrders",
|
"RequiredPermissionName": "App.Orders.PurchaseOrders",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ParentCode": "App.Public",
|
||||||
|
"Code": "App.BlogManagement",
|
||||||
|
"DisplayName": "App.BlogManagement",
|
||||||
|
"Order": 4,
|
||||||
|
"Url": null,
|
||||||
|
"Icon": "FcTemplate",
|
||||||
|
"RequiredPermissionName": null,
|
||||||
|
"IsDisabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ParentCode": "App.BlogManagement",
|
||||||
|
"Code": "App.BlogManagement.Category",
|
||||||
|
"DisplayName": "App.BlogManagement.Category",
|
||||||
|
"Order": 1,
|
||||||
|
"Url": "/admin/list/list-blogcategory",
|
||||||
|
"Icon": "FaCertificate",
|
||||||
|
"RequiredPermissionName": "App.BlogManagement.Category",
|
||||||
|
"IsDisabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ParentCode": "App.BlogManagement",
|
||||||
|
"Code": "App.BlogManagement.Posts",
|
||||||
|
"DisplayName": "App.BlogManagement.Posts",
|
||||||
|
"Order": 2,
|
||||||
|
"Url": "/admin/list/list-blogpost",
|
||||||
|
"Icon": "FaWeixin",
|
||||||
|
"RequiredPermissionName": "App.BlogManagement.Posts",
|
||||||
|
"IsDisabled": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Public",
|
"ParentCode": "App.Public",
|
||||||
"Code": "App.Demos",
|
"Code": "App.Demos",
|
||||||
"DisplayName": "App.Demos",
|
"DisplayName": "App.Demos",
|
||||||
"Order": 3,
|
"Order": 5,
|
||||||
"Url": "/admin/list/list-demo",
|
"Url": "/admin/list/list-demo",
|
||||||
"Icon": "FcMissedCall",
|
"Icon": "FcMissedCall",
|
||||||
"RequiredPermissionName": "App.Demos",
|
"RequiredPermissionName": "App.Demos",
|
||||||
|
|
@ -3138,12 +3264,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Public",
|
"ParentCode": "App.Public",
|
||||||
"Code": "App.Services",
|
"Code": "App.Contact",
|
||||||
"DisplayName": "App.Services",
|
"DisplayName": "App.Contact",
|
||||||
"Order": 4,
|
"Order": 6,
|
||||||
"Url": "/admin/list/list-service",
|
"Url": "/admin/list/list-contact",
|
||||||
"Icon": "FcServices",
|
"Icon": "FcContacts",
|
||||||
"RequiredPermissionName": "App.Services",
|
"RequiredPermissionName": "App.Contact",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4265,8 +4391,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.BlogManagement",
|
"key": "App.BlogManagement",
|
||||||
"en": "Blog Management",
|
"en": "Blog",
|
||||||
"tr": "Blog Yönetimi"
|
"tr": "Blog"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -9905,8 +10031,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Orders",
|
"key": "App.Orders",
|
||||||
"tr": "Siparişler",
|
"tr": "Satınalma",
|
||||||
"en": "Orders"
|
"en": "Buy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -10865,8 +10991,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "Public.nav.products",
|
"key": "Public.nav.products",
|
||||||
"tr": "Ürünler",
|
"tr": "Satın Alma",
|
||||||
"en": "Products"
|
"en": "Buy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -13949,14 +14075,26 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Demos",
|
"key": "App.Demos",
|
||||||
"tr": "Demolar",
|
"tr": "Demo",
|
||||||
"en": "Demos"
|
"en": "Demo"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Services",
|
"key": "App.Services",
|
||||||
"tr": "Hizmetler",
|
"tr": "Hizmetler",
|
||||||
"en": "Services"
|
"en": "Services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.About",
|
||||||
|
"tr": "Hakkımızda",
|
||||||
|
"en": "About Us"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Contact",
|
||||||
|
"tr": "İletişim",
|
||||||
|
"en": "Contact"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Settings": [
|
"Settings": [
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,8 @@ public static class PlatformConsts
|
||||||
public const string ReportCategory = "list-reportcategory";
|
public const string ReportCategory = "list-reportcategory";
|
||||||
public const string Demo = "list-demo";
|
public const string Demo = "list-demo";
|
||||||
public const string Service = "list-service";
|
public const string Service = "list-service";
|
||||||
|
public const string About = "list-about";
|
||||||
|
public const string Contact = "list-contact";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Forms
|
public static class Forms
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,8 @@ public static class SeedConsts
|
||||||
public const string PurchaseOrders = Default + ".PurchaseOrders";
|
public const string PurchaseOrders = Default + ".PurchaseOrders";
|
||||||
}
|
}
|
||||||
public const string Demos = Prefix.App + ".Demos";
|
public const string Demos = Prefix.App + ".Demos";
|
||||||
|
public const string About = Prefix.App + ".About";
|
||||||
|
public const string Contact = Prefix.App + ".Contact";
|
||||||
|
|
||||||
//Administration
|
//Administration
|
||||||
public const string Administration = Prefix.App + ".Administration";
|
public const string Administration = Prefix.App + ".Administration";
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ export const ImportDashboard: React.FC<ImportDashboardProps> = ({ gridDto }) =>
|
||||||
const editableColumns = getEditableColumns()
|
const editableColumns = getEditableColumns()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto px-4 py-2 max-w-screen-2xl">
|
<div className="mx-auto px-4 py-2">
|
||||||
{/* Navigation Tabs */}
|
{/* Navigation Tabs */}
|
||||||
<div className="flex space-x-1 mb-4 bg-white rounded-lg p-1 shadow-sm border border-slate-200">
|
<div className="flex space-x-1 mb-4 bg-white rounded-lg p-1 shadow-sm border border-slate-200">
|
||||||
{['import', 'preview', 'history'].map((tab) => (
|
{['import', 'preview', 'history'].map((tab) => (
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ export const TemplateEditor: React.FC<TemplateEditorProps> = ({
|
||||||
<div className="flex-1 flex flex-col min-h-0">
|
<div className="flex-1 flex flex-col min-h-0">
|
||||||
{activeTab === 'info' && (
|
{activeTab === 'info' && (
|
||||||
<div className="overflow-y-auto flex-1 p-3">
|
<div className="overflow-y-auto flex-1 p-3">
|
||||||
<div className="max-w-6xl mx-auto">
|
<div className="mx-auto">
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||||
{/* Left Column - Basic Info */}
|
{/* Left Column - Basic Info */}
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import useWindowSize from '../hooks/useWindowSize'
|
||||||
import { useState, useCallback } from 'react'
|
import { useState, useCallback } from 'react'
|
||||||
import type ReactModal from 'react-modal'
|
import type ReactModal from 'react-modal'
|
||||||
import type { MouseEvent } from 'react'
|
import type { MouseEvent } from 'react'
|
||||||
|
import { Container } from '@/components/shared'
|
||||||
|
|
||||||
export interface DialogProps extends ReactModal.Props {
|
export interface DialogProps extends ReactModal.Props {
|
||||||
closable?: boolean
|
closable?: boolean
|
||||||
|
|
@ -53,22 +54,28 @@ const Dialog = (props: DialogProps) => {
|
||||||
onClose?.(e)
|
onClose?.(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleMaximize = useCallback((e: MouseEvent<HTMLSpanElement>) => {
|
const handleMaximize = useCallback(
|
||||||
|
(e: MouseEvent<HTMLSpanElement>) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
if (!isMaximized) {
|
if (!isMaximized) {
|
||||||
setOriginalDimensions({ width, height })
|
setOriginalDimensions({ width, height })
|
||||||
setIsMaximized(true)
|
setIsMaximized(true)
|
||||||
onMaximize?.()
|
onMaximize?.()
|
||||||
}
|
}
|
||||||
}, [isMaximized, width, height, onMaximize])
|
},
|
||||||
|
[isMaximized, width, height, onMaximize],
|
||||||
|
)
|
||||||
|
|
||||||
const handleRestore = useCallback((e: MouseEvent<HTMLSpanElement>) => {
|
const handleRestore = useCallback(
|
||||||
|
(e: MouseEvent<HTMLSpanElement>) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
if (isMaximized) {
|
if (isMaximized) {
|
||||||
setIsMaximized(false)
|
setIsMaximized(false)
|
||||||
onRestore?.()
|
onRestore?.()
|
||||||
}
|
}
|
||||||
}, [isMaximized, onRestore])
|
},
|
||||||
|
[isMaximized, onRestore],
|
||||||
|
)
|
||||||
|
|
||||||
const renderCloseButton = (
|
const renderCloseButton = (
|
||||||
<CloseButton absolute className="ltr:right-6 rtl:left-6" onClick={onCloseClick} />
|
<CloseButton absolute className="ltr:right-6 rtl:left-6" onClick={onCloseClick} />
|
||||||
|
|
@ -128,10 +135,7 @@ const Dialog = (props: DialogProps) => {
|
||||||
if (currentWidth !== undefined) {
|
if (currentWidth !== undefined) {
|
||||||
contentStyle.content.width = currentWidth
|
contentStyle.content.width = currentWidth
|
||||||
|
|
||||||
if (
|
if (typeof currentSize.width !== 'undefined' && currentSize.width <= SCREENS.sm) {
|
||||||
typeof currentSize.width !== 'undefined' &&
|
|
||||||
currentSize.width <= SCREENS.sm
|
|
||||||
) {
|
|
||||||
contentStyle.content.width = 'auto'
|
contentStyle.content.width = 'auto'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -145,7 +149,7 @@ const Dialog = (props: DialogProps) => {
|
||||||
const dialogClass = classNames(
|
const dialogClass = classNames(
|
||||||
defaultDialogContentClass,
|
defaultDialogContentClass,
|
||||||
isMaximized && 'maximized',
|
isMaximized && 'maximized',
|
||||||
contentClassName
|
contentClassName,
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import setNull from '@/utils/setNull'
|
||||||
import { Field, FieldArray, FieldProps, Form, Formik, FormikProps, getIn } from 'formik'
|
import { Field, FieldArray, FieldProps, Form, Formik, FormikProps, getIn } from 'formik'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { FaEdit, FaMinus, FaFileMedical, FaTrash } from 'react-icons/fa';
|
import { FaEdit, FaMinus, FaFileMedical, FaPlus, FaTrash } from 'react-icons/fa'
|
||||||
import { Link, useParams } from 'react-router-dom'
|
import { Link, useParams } from 'react-router-dom'
|
||||||
import { object, string } from 'yup'
|
import { object, string } from 'yup'
|
||||||
import {
|
import {
|
||||||
|
|
@ -1157,7 +1157,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Add"
|
title="Add"
|
||||||
icon={<HiOutlineDocumentAdd />}
|
icon={<FaPlus />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setDatabaseOperationsModalData({
|
setDatabaseOperationsModalData({
|
||||||
|
|
@ -1188,7 +1188,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Edit"
|
title="Edit"
|
||||||
icon={<FiEdit3 />}
|
icon={<FaEdit />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setDatabaseOperationsModalData({
|
setDatabaseOperationsModalData({
|
||||||
|
|
@ -1206,7 +1206,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Delete"
|
title="Delete"
|
||||||
icon={<MdDelete />}
|
icon={<FaTrash />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setConfirmDelete({
|
setConfirmDelete({
|
||||||
|
|
@ -1477,7 +1477,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Add"
|
title="Add"
|
||||||
icon={<HiOutlineDocumentAdd />}
|
icon={<FaPlus />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setDatabaseOperationsModalData({
|
setDatabaseOperationsModalData({
|
||||||
|
|
@ -1508,7 +1508,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Edit"
|
title="Edit"
|
||||||
icon={<FiEdit3 />}
|
icon={<FaEdit />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setDatabaseOperationsModalData({
|
setDatabaseOperationsModalData({
|
||||||
|
|
@ -1526,7 +1526,7 @@ function ChartEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
size="xs"
|
size="xs"
|
||||||
title="Delete"
|
title="Delete"
|
||||||
icon={<MdDelete />}
|
icon={<FaTrash />}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setConfirmDelete({
|
setConfirmDelete({
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ function RolesPermission({
|
||||||
}, [name])
|
}, [name])
|
||||||
|
|
||||||
return permissionList ? (
|
return permissionList ? (
|
||||||
|
<Container>
|
||||||
<Dialog
|
<Dialog
|
||||||
width="60%"
|
width="60%"
|
||||||
isOpen={open}
|
isOpen={open}
|
||||||
|
|
@ -226,11 +227,14 @@ function RolesPermission({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Container className="h-full">
|
|
||||||
<div className="flex flex-col md:flex-row gap-4">
|
<div className="flex flex-col md:flex-row gap-4">
|
||||||
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
||||||
<hr className="mb-2"></hr>
|
<hr className="mb-2"></hr>
|
||||||
<Menu variant={mode} defaultActiveKeys={[selectedGroup?.displayName ?? '']}>
|
<Menu
|
||||||
|
className="w-full"
|
||||||
|
variant={mode}
|
||||||
|
defaultActiveKeys={[selectedGroup?.displayName ?? '']}
|
||||||
|
>
|
||||||
{permissionList?.groups.map((group: any) => (
|
{permissionList?.groups.map((group: any) => (
|
||||||
<Menu.MenuItem
|
<Menu.MenuItem
|
||||||
key={group.name}
|
key={group.name}
|
||||||
|
|
@ -262,7 +266,6 @@ function RolesPermission({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
|
||||||
<div className="text-right mt-6">
|
<div className="text-right mt-6">
|
||||||
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
||||||
{translate('::Cancel')}
|
{translate('::Cancel')}
|
||||||
|
|
@ -272,6 +275,7 @@ function RolesPermission({
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
</Container>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,6 @@ function UsersPermission({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Container className="h-full">
|
|
||||||
<div className="flex flex-col md:flex-row gap-4">
|
<div className="flex flex-col md:flex-row gap-4">
|
||||||
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
||||||
<hr className="mt-2 mb-2"></hr>
|
<hr className="mt-2 mb-2"></hr>
|
||||||
|
|
@ -285,7 +284,6 @@ function UsersPermission({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
|
||||||
<div className="text-right mt-6">
|
<div className="text-right mt-6">
|
||||||
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
||||||
Cancel
|
Cancel
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue