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
|
||||
|
||||
|
|
@ -15847,6 +15848,603 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,14 @@
|
|||
{
|
||||
"Name": "App.Services",
|
||||
"DisplayName": "App.Services"
|
||||
},
|
||||
{
|
||||
"Name": "App.About",
|
||||
"DisplayName": "App.About"
|
||||
},
|
||||
{
|
||||
"Name": "App.Contact",
|
||||
"DisplayName": "App.Contact"
|
||||
}
|
||||
],
|
||||
"PermissionDefinitionRecords": [
|
||||
|
|
@ -2693,6 +2701,104 @@
|
|||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"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": [
|
||||
|
|
@ -3048,39 +3154,29 @@
|
|||
},
|
||||
{
|
||||
"ParentCode": "App.Public",
|
||||
"Code": "App.BlogManagement",
|
||||
"DisplayName": "App.BlogManagement",
|
||||
"Code": "App.About",
|
||||
"DisplayName": "App.About",
|
||||
"Order": 1,
|
||||
"Url": null,
|
||||
"Icon": "FcTemplate",
|
||||
"RequiredPermissionName": null,
|
||||
"Url": "/admin/list/list-about",
|
||||
"Icon": "FcAbout",
|
||||
"RequiredPermissionName": "App.About",
|
||||
"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",
|
||||
"ParentCode": "App.Public",
|
||||
"Code": "App.Services",
|
||||
"DisplayName": "App.Services",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/list-blogpost",
|
||||
"Icon": "FaWeixin",
|
||||
"RequiredPermissionName": "App.BlogManagement.Posts",
|
||||
"Url": "/admin/list/list-service",
|
||||
"Icon": "FcServices",
|
||||
"RequiredPermissionName": "App.Services",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Public",
|
||||
"Code": "App.Orders",
|
||||
"DisplayName": "App.Orders",
|
||||
"Order": 2,
|
||||
"Order": 3,
|
||||
"Url": null,
|
||||
"Icon": "FcEndCall",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -3126,11 +3222,41 @@
|
|||
"RequiredPermissionName": "App.Orders.PurchaseOrders",
|
||||
"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",
|
||||
"Code": "App.Demos",
|
||||
"DisplayName": "App.Demos",
|
||||
"Order": 3,
|
||||
"Order": 5,
|
||||
"Url": "/admin/list/list-demo",
|
||||
"Icon": "FcMissedCall",
|
||||
"RequiredPermissionName": "App.Demos",
|
||||
|
|
@ -3138,12 +3264,12 @@
|
|||
},
|
||||
{
|
||||
"ParentCode": "App.Public",
|
||||
"Code": "App.Services",
|
||||
"DisplayName": "App.Services",
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/list-service",
|
||||
"Icon": "FcServices",
|
||||
"RequiredPermissionName": "App.Services",
|
||||
"Code": "App.Contact",
|
||||
"DisplayName": "App.Contact",
|
||||
"Order": 6,
|
||||
"Url": "/admin/list/list-contact",
|
||||
"Icon": "FcContacts",
|
||||
"RequiredPermissionName": "App.Contact",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
|
|
@ -4265,8 +4391,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.BlogManagement",
|
||||
"en": "Blog Management",
|
||||
"tr": "Blog Yönetimi"
|
||||
"en": "Blog",
|
||||
"tr": "Blog"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -9905,8 +10031,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Orders",
|
||||
"tr": "Siparişler",
|
||||
"en": "Orders"
|
||||
"tr": "Satınalma",
|
||||
"en": "Buy"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -10865,8 +10991,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.nav.products",
|
||||
"tr": "Ürünler",
|
||||
"en": "Products"
|
||||
"tr": "Satın Alma",
|
||||
"en": "Buy"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -13949,14 +14075,26 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Demos",
|
||||
"tr": "Demolar",
|
||||
"en": "Demos"
|
||||
"tr": "Demo",
|
||||
"en": "Demo"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Services",
|
||||
"tr": "Hizmetler",
|
||||
"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": [
|
||||
|
|
|
|||
|
|
@ -375,6 +375,8 @@ public static class PlatformConsts
|
|||
public const string ReportCategory = "list-reportcategory";
|
||||
public const string Demo = "list-demo";
|
||||
public const string Service = "list-service";
|
||||
public const string About = "list-about";
|
||||
public const string Contact = "list-contact";
|
||||
}
|
||||
|
||||
public static class Forms
|
||||
|
|
|
|||
|
|
@ -376,6 +376,8 @@ public static class SeedConsts
|
|||
public const string PurchaseOrders = Default + ".PurchaseOrders";
|
||||
}
|
||||
public const string Demos = Prefix.App + ".Demos";
|
||||
public const string About = Prefix.App + ".About";
|
||||
public const string Contact = Prefix.App + ".Contact";
|
||||
|
||||
//Administration
|
||||
public const string Administration = Prefix.App + ".Administration";
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ export const ImportDashboard: React.FC<ImportDashboardProps> = ({ gridDto }) =>
|
|||
const editableColumns = getEditableColumns()
|
||||
|
||||
return (
|
||||
<div className="mx-auto px-4 py-2 max-w-screen-2xl">
|
||||
<div className="mx-auto px-4 py-2">
|
||||
{/* Navigation Tabs */}
|
||||
<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) => (
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ export const TemplateEditor: React.FC<TemplateEditorProps> = ({
|
|||
<div className="flex-1 flex flex-col min-h-0">
|
||||
{activeTab === 'info' && (
|
||||
<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">
|
||||
{/* Left Column - Basic Info */}
|
||||
<div className="space-y-6">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import useWindowSize from '../hooks/useWindowSize'
|
|||
import { useState, useCallback } from 'react'
|
||||
import type ReactModal from 'react-modal'
|
||||
import type { MouseEvent } from 'react'
|
||||
import { Container } from '@/components/shared'
|
||||
|
||||
export interface DialogProps extends ReactModal.Props {
|
||||
closable?: boolean
|
||||
|
|
@ -53,22 +54,28 @@ const Dialog = (props: DialogProps) => {
|
|||
onClose?.(e)
|
||||
}
|
||||
|
||||
const handleMaximize = useCallback((e: MouseEvent<HTMLSpanElement>) => {
|
||||
e.stopPropagation()
|
||||
if (!isMaximized) {
|
||||
setOriginalDimensions({ width, height })
|
||||
setIsMaximized(true)
|
||||
onMaximize?.()
|
||||
}
|
||||
}, [isMaximized, width, height, onMaximize])
|
||||
const handleMaximize = useCallback(
|
||||
(e: MouseEvent<HTMLSpanElement>) => {
|
||||
e.stopPropagation()
|
||||
if (!isMaximized) {
|
||||
setOriginalDimensions({ width, height })
|
||||
setIsMaximized(true)
|
||||
onMaximize?.()
|
||||
}
|
||||
},
|
||||
[isMaximized, width, height, onMaximize],
|
||||
)
|
||||
|
||||
const handleRestore = useCallback((e: MouseEvent<HTMLSpanElement>) => {
|
||||
e.stopPropagation()
|
||||
if (isMaximized) {
|
||||
setIsMaximized(false)
|
||||
onRestore?.()
|
||||
}
|
||||
}, [isMaximized, onRestore])
|
||||
const handleRestore = useCallback(
|
||||
(e: MouseEvent<HTMLSpanElement>) => {
|
||||
e.stopPropagation()
|
||||
if (isMaximized) {
|
||||
setIsMaximized(false)
|
||||
onRestore?.()
|
||||
}
|
||||
},
|
||||
[isMaximized, onRestore],
|
||||
)
|
||||
|
||||
const renderCloseButton = (
|
||||
<CloseButton absolute className="ltr:right-6 rtl:left-6" onClick={onCloseClick} />
|
||||
|
|
@ -128,10 +135,7 @@ const Dialog = (props: DialogProps) => {
|
|||
if (currentWidth !== undefined) {
|
||||
contentStyle.content.width = currentWidth
|
||||
|
||||
if (
|
||||
typeof currentSize.width !== 'undefined' &&
|
||||
currentSize.width <= SCREENS.sm
|
||||
) {
|
||||
if (typeof currentSize.width !== 'undefined' && currentSize.width <= SCREENS.sm) {
|
||||
contentStyle.content.width = 'auto'
|
||||
}
|
||||
}
|
||||
|
|
@ -145,7 +149,7 @@ const Dialog = (props: DialogProps) => {
|
|||
const dialogClass = classNames(
|
||||
defaultDialogContentClass,
|
||||
isMaximized && 'maximized',
|
||||
contentClassName
|
||||
contentClassName,
|
||||
)
|
||||
|
||||
return (
|
||||
|
|
@ -175,7 +179,7 @@ const Dialog = (props: DialogProps) => {
|
|||
animate={{
|
||||
transform: isOpen ? 'scale(1)' : 'scale(0.9)',
|
||||
}}
|
||||
style={{
|
||||
style={{
|
||||
width: isMaximized ? '100vw' : 'auto',
|
||||
height: isMaximized ? '100vh' : 'auto',
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import setNull from '@/utils/setNull'
|
|||
import { Field, FieldArray, FieldProps, Form, Formik, FormikProps, getIn } from 'formik'
|
||||
import { useEffect, useState } from 'react'
|
||||
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 { object, string } from 'yup'
|
||||
import {
|
||||
|
|
@ -1157,7 +1157,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Add"
|
||||
icon={<HiOutlineDocumentAdd />}
|
||||
icon={<FaPlus />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setDatabaseOperationsModalData({
|
||||
|
|
@ -1188,7 +1188,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Edit"
|
||||
icon={<FiEdit3 />}
|
||||
icon={<FaEdit />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setDatabaseOperationsModalData({
|
||||
|
|
@ -1206,7 +1206,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Delete"
|
||||
icon={<MdDelete />}
|
||||
icon={<FaTrash />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setConfirmDelete({
|
||||
|
|
@ -1477,7 +1477,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Add"
|
||||
icon={<HiOutlineDocumentAdd />}
|
||||
icon={<FaPlus />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setDatabaseOperationsModalData({
|
||||
|
|
@ -1508,7 +1508,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Edit"
|
||||
icon={<FiEdit3 />}
|
||||
icon={<FaEdit />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setDatabaseOperationsModalData({
|
||||
|
|
@ -1526,7 +1526,7 @@ function ChartEdit() {
|
|||
type="button"
|
||||
size="xs"
|
||||
title="Delete"
|
||||
icon={<MdDelete />}
|
||||
icon={<FaTrash />}
|
||||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setConfirmDelete({
|
||||
|
|
|
|||
|
|
@ -201,36 +201,40 @@ function RolesPermission({
|
|||
}, [name])
|
||||
|
||||
return permissionList ? (
|
||||
<Dialog
|
||||
width="60%"
|
||||
isOpen={open}
|
||||
onAfterOpen={() => changeGroup(permissionList?.groups[0].name)}
|
||||
onClose={onDialogClose}
|
||||
onRequestClose={onDialogClose}
|
||||
>
|
||||
<h5 className="mb-4">
|
||||
{translate('::Permission')} - {name}
|
||||
</h5>
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
<Container>
|
||||
<Dialog
|
||||
width="60%"
|
||||
isOpen={open}
|
||||
onAfterOpen={() => changeGroup(permissionList?.groups[0].name)}
|
||||
onClose={onDialogClose}
|
||||
onRequestClose={onDialogClose}
|
||||
>
|
||||
<h5 className="mb-4">
|
||||
{translate('::Permission')} - {name}
|
||||
</h5>
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
|
||||
<div className="flex flex-col md:flex-row gap-4 mb-2">
|
||||
<div style={{ width: '30%' }}>
|
||||
<Checkbox name="all" checked={isAllSelected} onChange={onSelectAll}>
|
||||
{translate('AbpPermissionManagement::SelectAllInAllTabs')}
|
||||
</Checkbox>
|
||||
<div className="flex flex-col md:flex-row gap-4 mb-2">
|
||||
<div style={{ width: '30%' }}>
|
||||
<Checkbox name="all" checked={isAllSelected} onChange={onSelectAll}>
|
||||
{translate('AbpPermissionManagement::SelectAllInAllTabs')}
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div style={{ width: '70%' }}>
|
||||
<Checkbox name="group" checked={isAllSelectedForGroup} onChange={onSelectAll}>
|
||||
{translate('AbpPermissionManagement::SelectAllInThisTab')}
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ width: '70%' }}>
|
||||
<Checkbox name="group" checked={isAllSelectedForGroup} onChange={onSelectAll}>
|
||||
{translate('AbpPermissionManagement::SelectAllInThisTab')}
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Container className="h-full">
|
||||
<div className="flex flex-col md:flex-row gap-4">
|
||||
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
||||
<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) => (
|
||||
<Menu.MenuItem
|
||||
key={group.name}
|
||||
|
|
@ -262,16 +266,16 @@ function RolesPermission({
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
<div className="text-right mt-6">
|
||||
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
||||
{translate('::Cancel')}
|
||||
</Button>
|
||||
<Button variant="solid" loading={isLoading} onClick={onDialogOk}>
|
||||
{isLoading ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
<div className="text-right mt-6">
|
||||
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
||||
{translate('::Cancel')}
|
||||
</Button>
|
||||
<Button variant="solid" loading={isLoading} onClick={onDialogOk}>
|
||||
{isLoading ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
</Container>
|
||||
) : (
|
||||
<></>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -236,56 +236,54 @@ function UsersPermission({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<Container className="h-full">
|
||||
<div className="flex flex-col md:flex-row gap-4">
|
||||
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
<Menu variant={mode} defaultActiveKeys={[selectedGroup?.displayName ?? '']}>
|
||||
{permissionList?.groups.map((group) => (
|
||||
<Menu.MenuItem
|
||||
key={group.name}
|
||||
className="break-all whitespace-normal"
|
||||
eventKey={group.name}
|
||||
onSelect={() => {
|
||||
changeGroup(group.name)
|
||||
}}
|
||||
<div className="flex flex-col md:flex-row gap-4">
|
||||
<div style={{ width: '30%' }} className="max-h-[470px] overflow-y-auto">
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
<Menu variant={mode} defaultActiveKeys={[selectedGroup?.displayName ?? '']}>
|
||||
{permissionList?.groups.map((group) => (
|
||||
<Menu.MenuItem
|
||||
key={group.name}
|
||||
className="break-all whitespace-normal"
|
||||
eventKey={group.name}
|
||||
onSelect={() => {
|
||||
changeGroup(group.name)
|
||||
}}
|
||||
>
|
||||
{translate('::' + group.displayName)} (
|
||||
{group.permissions.filter((a) => a.isGranted).length})
|
||||
</Menu.MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</div>
|
||||
<div style={{ width: '70%' }} className="max-h-[470px] overflow-y-auto">
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
<div className="card-body">
|
||||
{selectedGroupPermissions.map((permission) => (
|
||||
<div key={permission.name}>
|
||||
<Checkbox
|
||||
name={permission.name}
|
||||
className={permission.class}
|
||||
disabled={isGrantedByOtherProviderName(permission.grantedProviders)}
|
||||
//disabled={permission.grantedProviders.length > 0 ? true : false}
|
||||
checked={permission.isGranted}
|
||||
onChange={() => onClickCheckbox(permission)}
|
||||
>
|
||||
{translate('::' + group.displayName)} (
|
||||
{group.permissions.filter((a) => a.isGranted).length})
|
||||
</Menu.MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</div>
|
||||
<div style={{ width: '70%' }} className="max-h-[470px] overflow-y-auto">
|
||||
<hr className="mt-2 mb-2"></hr>
|
||||
<div className="card-body">
|
||||
{selectedGroupPermissions.map((permission) => (
|
||||
<div key={permission.name}>
|
||||
<Checkbox
|
||||
name={permission.name}
|
||||
className={permission.class}
|
||||
disabled={isGrantedByOtherProviderName(permission.grantedProviders)}
|
||||
//disabled={permission.grantedProviders.length > 0 ? true : false}
|
||||
checked={permission.isGranted}
|
||||
onChange={() => onClickCheckbox(permission)}
|
||||
>
|
||||
{translate('::' + permission.displayName)}
|
||||
{permission.grantedProviders.map((provider) => (
|
||||
<Badge
|
||||
key={provider.providerKey}
|
||||
className="m-2"
|
||||
content={`${provider.providerName}${
|
||||
provider.providerName !== providerName ? `: ${provider.providerKey}` : ''
|
||||
}`}
|
||||
/>
|
||||
))}
|
||||
</Checkbox>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{translate('::' + permission.displayName)}
|
||||
{permission.grantedProviders.map((provider) => (
|
||||
<Badge
|
||||
key={provider.providerKey}
|
||||
className="m-2"
|
||||
content={`${provider.providerName}${
|
||||
provider.providerName !== providerName ? `: ${provider.providerKey}` : ''
|
||||
}`}
|
||||
/>
|
||||
))}
|
||||
</Checkbox>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
<div className="text-right mt-6">
|
||||
<Button className="ltr:mr-2 rtl:ml-2" variant="plain" onClick={onDialogClose}>
|
||||
Cancel
|
||||
|
|
|
|||
Loading…
Reference in a new issue