QuestionTag ve Seeder düzenlemesi
This commit is contained in:
parent
d1a254495e
commit
0f83f0399b
18 changed files with 221 additions and 233 deletions
|
|
@ -7881,9 +7881,9 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Definitions.Tag",
|
"key": "App.Definitions.QuestionTag",
|
||||||
"tr": "Etiketler",
|
"tr": "Soru Etiketleri",
|
||||||
"en": "Tags"
|
"en": "Question Tags"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -14612,12 +14612,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Coordinator.Definitions",
|
"ParentCode": "App.Coordinator.Definitions",
|
||||||
"Code": "App.Definitions.Tag",
|
"Code": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "App.Definitions.Tag",
|
"DisplayName": "App.Definitions.QuestionTag",
|
||||||
"Order": 10,
|
"Order": 10,
|
||||||
"Url": "/admin/list/list-tag",
|
"Url": "/admin/list/list-questiontag",
|
||||||
"Icon": "FcTags",
|
"Icon": "FcTags",
|
||||||
"RequiredPermissionName": "App.Definitions.Tag",
|
"RequiredPermissionName": "App.Definitions.QuestionTag",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -21918,17 +21918,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag",
|
"Name": "App.Definitions.QuestionTag",
|
||||||
"ParentName": null,
|
"ParentName": null,
|
||||||
"DisplayName": "App.Definitions.Tag",
|
"DisplayName": "App.Definitions.QuestionTag",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Kurs"
|
"MenuGroup": "Kurs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Create",
|
"Name": "App.Definitions.QuestionTag.Create",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Create",
|
"DisplayName": "Create",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -21936,8 +21936,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Update",
|
"Name": "App.Definitions.QuestionTag.Update",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Update",
|
"DisplayName": "Update",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -21945,8 +21945,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Delete",
|
"Name": "App.Definitions.QuestionTag.Delete",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Delete",
|
"DisplayName": "Delete",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -21954,8 +21954,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Export",
|
"Name": "App.Definitions.QuestionTag.Export",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Export",
|
"DisplayName": "Export",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -21963,8 +21963,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Import",
|
"Name": "App.Definitions.QuestionTag.Import",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Import",
|
"DisplayName": "Import",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -21972,8 +21972,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Coordinator",
|
"GroupName": "App.Coordinator",
|
||||||
"Name": "App.Definitions.Tag.Activity",
|
"Name": "App.Definitions.QuestionTag.Activity",
|
||||||
"ParentName": "App.Definitions.Tag",
|
"ParentName": "App.Definitions.QuestionTag",
|
||||||
"DisplayName": "Activity",
|
"DisplayName": "Activity",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
|
||||||
|
|
@ -30216,8 +30216,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//Classroom
|
//Classroom
|
||||||
#region Tag
|
#region QuestionTag
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Tag))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.QuestionTag))
|
||||||
{
|
{
|
||||||
var listFormTag = await _listFormRepository.InsertAsync(
|
var listFormTag = await _listFormRepository.InsertAsync(
|
||||||
new ListForm()
|
new ListForm()
|
||||||
|
|
@ -30234,16 +30234,16 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
CardLayoutColumn = 3
|
CardLayoutColumn = 3
|
||||||
}),
|
}),
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
ListFormCode = ListFormCodes.Lists.Tag,
|
ListFormCode = ListFormCodes.Lists.QuestionTag,
|
||||||
Name = AppCodes.Definitions.Tag,
|
Name = AppCodes.Definitions.QuestionTag,
|
||||||
Title = AppCodes.Definitions.Tag,
|
Title = AppCodes.Definitions.QuestionTag,
|
||||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
IsTenant = true,
|
IsTenant = true,
|
||||||
IsBranch = false,
|
IsBranch = false,
|
||||||
IsOrganizationUnit = false,
|
IsOrganizationUnit = false,
|
||||||
Description = AppCodes.Definitions.Tag,
|
Description = AppCodes.Definitions.QuestionTag,
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
SelectCommand = SelectCommandByTableName("Tag", Prefix.DbTableCoordinator),
|
SelectCommand = SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator),
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = "\"IsDeleted\" = 'false'",
|
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||||
|
|
@ -30268,15 +30268,15 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||||
{
|
{
|
||||||
C = AppCodes.Definitions.Tag + ".Create",
|
C = AppCodes.Definitions.QuestionTag + ".Create",
|
||||||
R = AppCodes.Definitions.Tag,
|
R = AppCodes.Definitions.QuestionTag,
|
||||||
U = AppCodes.Definitions.Tag + ".Update",
|
U = AppCodes.Definitions.QuestionTag + ".Update",
|
||||||
D = AppCodes.Definitions.Tag + ".Delete",
|
D = AppCodes.Definitions.QuestionTag + ".Delete",
|
||||||
E = AppCodes.Definitions.Tag + ".Export",
|
E = AppCodes.Definitions.QuestionTag + ".Export",
|
||||||
I = AppCodes.Definitions.Tag + ".Import",
|
I = AppCodes.Definitions.QuestionTag + ".Import",
|
||||||
A = AppCodes.Definitions.Tag + ".Activity",
|
A = AppCodes.Definitions.QuestionTag + ".Activity",
|
||||||
}),
|
}),
|
||||||
DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Tag", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
DeleteCommand = $"UPDATE \"{SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
new() {
|
new() {
|
||||||
FieldName = "DeleterId",
|
FieldName = "DeleterId",
|
||||||
|
|
@ -30368,9 +30368,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
{
|
{
|
||||||
C = AppCodes.Definitions.Tag + ".Create",
|
C = AppCodes.Definitions.QuestionTag + ".Create",
|
||||||
R = AppCodes.Definitions.Tag,
|
R = AppCodes.Definitions.QuestionTag,
|
||||||
U = AppCodes.Definitions.Tag + ".Update",
|
U = AppCodes.Definitions.QuestionTag + ".Update",
|
||||||
E = true,
|
E = true,
|
||||||
I = true,
|
I = true,
|
||||||
Deny = false
|
Deny = false
|
||||||
|
|
@ -30404,9 +30404,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
{
|
{
|
||||||
C = AppCodes.Definitions.Tag + ".Create",
|
C = AppCodes.Definitions.QuestionTag + ".Create",
|
||||||
R = AppCodes.Definitions.Tag,
|
R = AppCodes.Definitions.QuestionTag,
|
||||||
U = AppCodes.Definitions.Tag + ".Update",
|
U = AppCodes.Definitions.QuestionTag + ".Update",
|
||||||
E = true,
|
E = true,
|
||||||
I = true,
|
I = true,
|
||||||
Deny = false
|
Deny = false
|
||||||
|
|
@ -30435,9 +30435,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
{
|
{
|
||||||
C = AppCodes.Definitions.Tag + ".Create",
|
C = AppCodes.Definitions.QuestionTag + ".Create",
|
||||||
R = AppCodes.Definitions.Tag,
|
R = AppCodes.Definitions.QuestionTag,
|
||||||
U = AppCodes.Definitions.Tag + ".Update",
|
U = AppCodes.Definitions.QuestionTag + ".Update",
|
||||||
E = true,
|
E = true,
|
||||||
I = true,
|
I = true,
|
||||||
Deny = false
|
Deny = false
|
||||||
|
|
@ -30466,9 +30466,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
{
|
{
|
||||||
C = AppCodes.Definitions.Tag + ".Create",
|
C = AppCodes.Definitions.QuestionTag + ".Create",
|
||||||
R = AppCodes.Definitions.Tag,
|
R = AppCodes.Definitions.QuestionTag,
|
||||||
U = AppCodes.Definitions.Tag + ".Update",
|
U = AppCodes.Definitions.QuestionTag + ".Update",
|
||||||
E = true,
|
E = true,
|
||||||
I = true,
|
I = true,
|
||||||
Deny = false
|
Deny = false
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ public static class PlatformConsts
|
||||||
$"SELECT " +
|
$"SELECT " +
|
||||||
$"\"Id\" AS \"Key\", " +
|
$"\"Id\" AS \"Key\", " +
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
$"FROM \"{SelectCommandByTableName("Tag", Prefix.DbTableCoordinator)}\" " +
|
$"FROM \"{SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator)}\" " +
|
||||||
$"WHERE " +
|
$"WHERE " +
|
||||||
$"\"IsDeleted\" = 'false' ";
|
$"\"IsDeleted\" = 'false' ";
|
||||||
}
|
}
|
||||||
|
|
@ -612,7 +612,7 @@ public static class PlatformConsts
|
||||||
public const string ClassType = "list-classtype";
|
public const string ClassType = "list-classtype";
|
||||||
public const string Class = "list-class";
|
public const string Class = "list-class";
|
||||||
public const string Level = "list-level";
|
public const string Level = "list-level";
|
||||||
public const string Tag = "list-tag";
|
public const string QuestionTag = "list-questiontag";
|
||||||
public const string QuestionPool = "list-questionpool";
|
public const string QuestionPool = "list-questionpool";
|
||||||
public const string Question = "list-question";
|
public const string Question = "list-question";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -438,7 +438,7 @@ public static class SeedConsts
|
||||||
public const string ClassType = Default + ".ClassType";
|
public const string ClassType = Default + ".ClassType";
|
||||||
public const string Class = Default + ".Class";
|
public const string Class = Default + ".Class";
|
||||||
public const string Level = Default + ".Level";
|
public const string Level = Default + ".Level";
|
||||||
public const string Tag = Default + ".Tag";
|
public const string QuestionTag = Default + ".QuestionTag";
|
||||||
public const string QuestionPool = Default + ".QuestionPool";
|
public const string QuestionPool = Default + ".QuestionPool";
|
||||||
public const string Question = Default + ".Question";
|
public const string Question = Default + ".Question";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
public class Tag : FullAuditedEntity<Guid>, IMultiTenant
|
public class QuestionTag : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId;
|
public Guid? TenantId;
|
||||||
|
|
||||||
|
|
@ -140,7 +140,7 @@ public class PlatformDbContext :
|
||||||
public DbSet<ClassroomAttandance> AttendanceRecords { get; set; }
|
public DbSet<ClassroomAttandance> AttendanceRecords { get; set; }
|
||||||
public DbSet<ClassroomChat> ChatMessages { get; set; }
|
public DbSet<ClassroomChat> ChatMessages { get; set; }
|
||||||
|
|
||||||
public DbSet<Tag> Tags { get; set; }
|
public DbSet<QuestionTag> Tags { get; set; }
|
||||||
public DbSet<QuestionPool> QuestionPools { get; set; }
|
public DbSet<QuestionPool> QuestionPools { get; set; }
|
||||||
public DbSet<Question> Questions { get; set; }
|
public DbSet<Question> Questions { get; set; }
|
||||||
public DbSet<QuestionOption> QuestionOptions { get; set; }
|
public DbSet<QuestionOption> QuestionOptions { get; set; }
|
||||||
|
|
@ -1567,9 +1567,9 @@ public class PlatformDbContext :
|
||||||
b.HasIndex(x => x.Timestamp);
|
b.HasIndex(x => x.Timestamp);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Tag>(b =>
|
builder.Entity<QuestionTag>(b =>
|
||||||
{
|
{
|
||||||
b.ToTable(Prefix.DbTableCoordinator + nameof(Tag), Prefix.DbSchema);
|
b.ToTable(Prefix.DbTableCoordinator + nameof(QuestionTag), Prefix.DbSchema);
|
||||||
b.ConfigureByConvention();
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(100);
|
b.Property(x => x.Name).IsRequired().HasMaxLength(100);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251016203825_Initial")]
|
[Migration("20251016215302_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -5314,6 +5314,68 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("CQuestionPool", (string)null);
|
b.ToTable("CQuestionPool", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Color")
|
||||||
|
.HasMaxLength(7)
|
||||||
|
.HasColumnType("nvarchar(7)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("nvarchar(100)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<int>("UsageCount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CQuestionTag", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -6323,68 +6385,6 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("DSource", (string)null);
|
b.ToTable("DSource", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.Tag", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<string>("Color")
|
|
||||||
.HasMaxLength(7)
|
|
||||||
.HasColumnType("nvarchar(7)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("CreationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("CreatorId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("CreatorId");
|
|
||||||
|
|
||||||
b.Property<Guid?>("DeleterId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("DeleterId");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DeletionTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("DeletionTime");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasMaxLength(500)
|
|
||||||
.HasColumnType("nvarchar(500)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bit")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("IsDeleted");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("LastModificationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("LastModifierId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("LastModifierId");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(100)
|
|
||||||
.HasColumnType("nvarchar(100)");
|
|
||||||
|
|
||||||
b.Property<Guid?>("TenantId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("TenantId");
|
|
||||||
|
|
||||||
b.Property<int>("UsageCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int")
|
|
||||||
.HasDefaultValue(0);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("CTag", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -490,7 +490,7 @@ namespace Kurs.Platform.Migrations
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "CTag",
|
name: "CQuestionTag",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
|
@ -509,7 +509,7 @@ namespace Kurs.Platform.Migrations
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_CTag", x => x.Id);
|
table.PrimaryKey("PK_CQuestionTag", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
|
|
@ -4275,7 +4275,7 @@ namespace Kurs.Platform.Migrations
|
||||||
name: "CQuestionOption");
|
name: "CQuestionOption");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "CTag");
|
name: "CQuestionTag");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "DBankAccount");
|
name: "DBankAccount");
|
||||||
|
|
@ -5311,6 +5311,68 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("CQuestionPool", (string)null);
|
b.ToTable("CQuestionPool", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Color")
|
||||||
|
.HasMaxLength(7)
|
||||||
|
.HasColumnType("nvarchar(7)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("nvarchar(100)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<int>("UsageCount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CQuestionTag", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -6320,68 +6382,6 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("DSource", (string)null);
|
b.ToTable("DSource", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.Tag", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<string>("Color")
|
|
||||||
.HasMaxLength(7)
|
|
||||||
.HasColumnType("nvarchar(7)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("CreationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("CreatorId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("CreatorId");
|
|
||||||
|
|
||||||
b.Property<Guid?>("DeleterId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("DeleterId");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DeletionTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("DeletionTime");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasMaxLength(500)
|
|
||||||
.HasColumnType("nvarchar(500)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bit")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("IsDeleted");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("LastModificationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("LastModifierId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("LastModifierId");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(100)
|
|
||||||
.HasColumnType("nvarchar(100)");
|
|
||||||
|
|
||||||
b.Property<Guid?>("TenantId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("TenantId");
|
|
||||||
|
|
||||||
b.Property<int>("UsageCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int")
|
|
||||||
.HasDefaultValue(0);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("CTag", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
|
||||||
|
|
@ -1807,7 +1807,7 @@
|
||||||
"settingsJson": "{\"AllowHandRaise\":true,\"AllowStudentChat\":true,\"AllowPrivateMessages\":true,\"AllowStudentScreenShare\":true,\"DefaultMicrophoneState\":\"muted\",\"DefaultCameraState\":\"off\",\"DefaultLayout\":\"grid\",\"AutoMuteNewParticipants\":true}"
|
"settingsJson": "{\"AllowHandRaise\":true,\"AllowStudentChat\":true,\"AllowPrivateMessages\":true,\"AllowStudentScreenShare\":true,\"DefaultMicrophoneState\":\"muted\",\"DefaultCameraState\":\"off\",\"DefaultLayout\":\"grid\",\"AutoMuteNewParticipants\":true}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Tags": [
|
"QuestionTags": [
|
||||||
{
|
{
|
||||||
"Name": "Grammar",
|
"Name": "Grammar",
|
||||||
"Description": "Grammar related questions",
|
"Description": "Grammar related questions",
|
||||||
|
|
@ -1865,7 +1865,7 @@
|
||||||
"Content": "Select the appropriate tense form for the given context.",
|
"Content": "Select the appropriate tense form for the given context.",
|
||||||
"MediaType": "image",
|
"MediaType": "image",
|
||||||
"MediaUrl": "",
|
"MediaUrl": "",
|
||||||
"CorrectAnswer": "opt2",
|
"CorrectAnswer": "",
|
||||||
"Difficulty": "easy",
|
"Difficulty": "easy",
|
||||||
"TimeLimit": 0,
|
"TimeLimit": 0,
|
||||||
"Explanation": ""
|
"Explanation": ""
|
||||||
|
|
@ -1878,7 +1878,7 @@
|
||||||
"Content": "Fill in the blank: \"I saw _____ elephant at the zoo yesterday.\"",
|
"Content": "Fill in the blank: \"I saw _____ elephant at the zoo yesterday.\"",
|
||||||
"MediaType": "image",
|
"MediaType": "image",
|
||||||
"MediaUrl": "",
|
"MediaUrl": "",
|
||||||
"CorrectAnswer": "an",
|
"CorrectAnswer": "",
|
||||||
"Difficulty": "medium",
|
"Difficulty": "medium",
|
||||||
"TimeLimit": 0,
|
"TimeLimit": 0,
|
||||||
"Explanation": ""
|
"Explanation": ""
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<ClassCancellationReason, Guid> _classCancellationReasonRepository;
|
private readonly IRepository<ClassCancellationReason, Guid> _classCancellationReasonRepository;
|
||||||
private readonly IRepository<WorkHour, Guid> _workHourRepository;
|
private readonly IRepository<WorkHour, Guid> _workHourRepository;
|
||||||
private readonly IRepository<Classroom, Guid> _classroomRepository;
|
private readonly IRepository<Classroom, Guid> _classroomRepository;
|
||||||
private readonly IRepository<Tag, Guid> _tagRepository;
|
private readonly IRepository<QuestionTag, Guid> _tagRepository;
|
||||||
private readonly IRepository<QuestionPool, Guid> _questionPoolRepository;
|
private readonly IRepository<QuestionPool, Guid> _questionPoolRepository;
|
||||||
private readonly IRepository<Question, Guid> _questionRepository;
|
private readonly IRepository<Question, Guid> _questionRepository;
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<Interesting, Guid> interestingRepository,
|
IRepository<Interesting, Guid> interestingRepository,
|
||||||
IRepository<Program, Guid> programRepository,
|
IRepository<Program, Guid> programRepository,
|
||||||
IRepository<ForumCategory, Guid> forumCategoryRepository,
|
IRepository<ForumCategory, Guid> forumCategoryRepository,
|
||||||
IRepository<Tag, Guid> tagRepository,
|
IRepository<QuestionTag, Guid> tagRepository,
|
||||||
IRepository<QuestionPool, Guid> questionPoolRepository,
|
IRepository<QuestionPool, Guid> questionPoolRepository,
|
||||||
IRepository<Question, Guid> questionRepository
|
IRepository<Question, Guid> questionRepository
|
||||||
)
|
)
|
||||||
|
|
@ -737,18 +737,18 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in items.Tags)
|
foreach (var item in items.QuestionTags)
|
||||||
{
|
{
|
||||||
var exists = await _tagRepository.AnyAsync(x => x.Name == item.Name);
|
var exists = await _tagRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _tagRepository.InsertAsync(new Tag
|
await _tagRepository.InsertAsync(new QuestionTag
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Description = item.Description,
|
Description = item.Description,
|
||||||
Color = item.Color
|
Color = item.Color
|
||||||
});
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -765,22 +765,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var tagIds = new List<Guid>();
|
var tagIds = new List<Guid>();
|
||||||
foreach (var tagName in tagNames)
|
foreach (var tagName in tagNames)
|
||||||
{
|
{
|
||||||
var tagEntity = items.Tags.FirstOrDefault(t =>
|
var existingTag = await _tagRepository.FirstOrDefaultAsync(x => x.Name == tagName);
|
||||||
string.Equals(t.Name, tagName, StringComparison.OrdinalIgnoreCase));
|
if (existingTag != null)
|
||||||
|
|
||||||
if (tagEntity != null)
|
|
||||||
{
|
{
|
||||||
var existingTag = await _tagRepository.FirstOrDefaultAsync(x => x.Name == tagEntity.Name);
|
|
||||||
if (existingTag == null)
|
|
||||||
{
|
|
||||||
existingTag = await _tagRepository.InsertAsync(new Tag
|
|
||||||
{
|
|
||||||
Name = tagEntity.Name,
|
|
||||||
Description = tagEntity.Description,
|
|
||||||
Color = tagEntity.Color
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
tagIds.Add(existingTag.Id);
|
tagIds.Add(existingTag.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class TenantSeederDto
|
||||||
public List<BlogPostSeedDto> BlogPosts { get; set; }
|
public List<BlogPostSeedDto> BlogPosts { get; set; }
|
||||||
public List<ContactSeedDto> Contacts { get; set; }
|
public List<ContactSeedDto> Contacts { get; set; }
|
||||||
public List<ClassroomSeedDto> Classrooms { get; set; }
|
public List<ClassroomSeedDto> Classrooms { get; set; }
|
||||||
public List<TagSeedDto> Tags { get; set; }
|
public List<QuestionTagSeedDto> QuestionTags { get; set; }
|
||||||
public List<QuestionPoolSeedDto> QuestionPools { get; set; }
|
public List<QuestionPoolSeedDto> QuestionPools { get; set; }
|
||||||
public List<QuestionSeedDto> Questions { get; set; }
|
public List<QuestionSeedDto> Questions { get; set; }
|
||||||
|
|
||||||
|
|
@ -348,7 +348,7 @@ public class ProgramSeedDto
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TagSeedDto
|
public class QuestionTagSeedDto
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,12 @@ const useListFormColumns = ({
|
||||||
gridDto,
|
gridDto,
|
||||||
listFormCode,
|
listFormCode,
|
||||||
isSubForm,
|
isSubForm,
|
||||||
|
gridRef,
|
||||||
}: {
|
}: {
|
||||||
gridDto?: GridDto
|
gridDto?: GridDto
|
||||||
listFormCode: string
|
listFormCode: string
|
||||||
isSubForm?: boolean
|
isSubForm?: boolean
|
||||||
|
gridRef?: any
|
||||||
}) => {
|
}) => {
|
||||||
const dialog: any = useDialogContext()
|
const dialog: any = useDialogContext()
|
||||||
const { translate } = useLocalization()
|
const { translate } = useLocalization()
|
||||||
|
|
@ -289,24 +291,10 @@ const useListFormColumns = ({
|
||||||
|
|
||||||
if (hasUpdate) {
|
if (hasUpdate) {
|
||||||
column.buttons.push('edit')
|
column.buttons.push('edit')
|
||||||
// column.buttons.push({
|
|
||||||
// icon: 'edit',
|
|
||||||
// hint: translate('::Edit'),
|
|
||||||
// name: 'edit',
|
|
||||||
// text: translate('::Edit'),
|
|
||||||
// cssClass: 'big-button',
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasDelete) {
|
if (hasDelete) {
|
||||||
column.buttons.push('delete')
|
column.buttons.push('delete')
|
||||||
// column.buttons.push({
|
|
||||||
// icon: 'trash',
|
|
||||||
// hint: translate('::Delete'),
|
|
||||||
// name: 'delete',
|
|
||||||
// text: translate('::Delete'),
|
|
||||||
// cssClass: 'big-button',
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gridDto.gridOptions.commandColumnDto.forEach((action) => {
|
gridDto.gridOptions.commandColumnDto.forEach((action) => {
|
||||||
|
|
@ -340,6 +328,12 @@ const useListFormColumns = ({
|
||||||
dialog.setConfig({
|
dialog.setConfig({
|
||||||
component: action.dialogName,
|
component: action.dialogName,
|
||||||
props: dynamicMap,
|
props: dynamicMap,
|
||||||
|
onClose: () => {
|
||||||
|
// Dialog kapandığında grid'i yenile
|
||||||
|
if (gridRef?.current?.instance) {
|
||||||
|
gridRef.current.instance.refresh()
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (action.onClick) {
|
} else if (action.onClick) {
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ const useGridData = (props: {
|
||||||
gridDto,
|
gridDto,
|
||||||
listFormCode,
|
listFormCode,
|
||||||
isSubForm,
|
isSubForm,
|
||||||
|
gridRef: undefined,
|
||||||
})
|
})
|
||||||
const { createSelectDataSource } = useListFormCustomDataSource({})
|
const { createSelectDataSource } = useListFormCustomDataSource({})
|
||||||
const { getLookupDataSource } = useLookupDataSource({ listFormCode, isSubForm })
|
const { getLookupDataSource } = useLookupDataSource({ listFormCode, isSubForm })
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ const Grid = (props: GridProps) => {
|
||||||
gridDto,
|
gridDto,
|
||||||
listFormCode,
|
listFormCode,
|
||||||
isSubForm,
|
isSubForm,
|
||||||
|
gridRef,
|
||||||
})
|
})
|
||||||
|
|
||||||
function extractSearchParamsFields(filter: any): [string, string, any][] {
|
function extractSearchParamsFields(filter: any): [string, string, any][] {
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,7 @@ import WidgetGroup from '@/components/common/WidgetGroup'
|
||||||
import { Button } from '@/components/ui'
|
import { Button } from '@/components/ui'
|
||||||
import {
|
import {
|
||||||
FaCog,
|
FaCog,
|
||||||
FaInfoCircle,
|
|
||||||
FaSyncAlt,
|
|
||||||
FaTimes,
|
FaTimes,
|
||||||
FaTrash,
|
|
||||||
FaTrashAlt,
|
|
||||||
FaUndo,
|
FaUndo,
|
||||||
} from 'react-icons/fa'
|
} from 'react-icons/fa'
|
||||||
import { usePermission } from '@/utils/hooks/usePermission'
|
import { usePermission } from '@/utils/hooks/usePermission'
|
||||||
|
|
@ -83,6 +79,7 @@ const Pivot = (props: PivotProps) => {
|
||||||
gridDto,
|
gridDto,
|
||||||
listFormCode,
|
listFormCode,
|
||||||
isSubForm,
|
isSubForm,
|
||||||
|
gridRef,
|
||||||
})
|
})
|
||||||
|
|
||||||
function onCellPrepared(e: any) {
|
function onCellPrepared(e: any) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { createContext, useContext, useState } from 'react'
|
||||||
export type DialogConfig = {
|
export type DialogConfig = {
|
||||||
component?: string
|
component?: string
|
||||||
props?: any
|
props?: any
|
||||||
|
onClose?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DialogContext = createContext({})
|
export const DialogContext = createContext({})
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,20 @@ import QuestionDialog from '@/views/coordinator/QuestionDialog'
|
||||||
const DialogShowComponent = (): JSX.Element => {
|
const DialogShowComponent = (): JSX.Element => {
|
||||||
const dialogContext: any = useDialogContext()
|
const dialogContext: any = useDialogContext()
|
||||||
|
|
||||||
|
const handleDialogClose = () => {
|
||||||
|
if (dialogContext.config?.onClose) {
|
||||||
|
dialogContext.config.onClose()
|
||||||
|
}
|
||||||
|
dialogContext.setConfig({})
|
||||||
|
}
|
||||||
|
|
||||||
const getComponent = (param: string) => {
|
const getComponent = (param: string) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'RolesPermission':
|
case 'RolesPermission':
|
||||||
return (
|
return (
|
||||||
<RolesPermission
|
<RolesPermission
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></RolesPermission>
|
></RolesPermission>
|
||||||
)
|
)
|
||||||
|
|
@ -24,7 +31,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<UsersPermission
|
<UsersPermission
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></UsersPermission>
|
></UsersPermission>
|
||||||
)
|
)
|
||||||
|
|
@ -32,7 +39,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<TenantsConnectionString
|
<TenantsConnectionString
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></TenantsConnectionString>
|
></TenantsConnectionString>
|
||||||
)
|
)
|
||||||
|
|
@ -40,7 +47,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<CreateNotification
|
<CreateNotification
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></CreateNotification>
|
></CreateNotification>
|
||||||
)
|
)
|
||||||
|
|
@ -48,7 +55,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<AuditLogDetail
|
<AuditLogDetail
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></AuditLogDetail>
|
></AuditLogDetail>
|
||||||
)
|
)
|
||||||
|
|
@ -56,7 +63,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<BranchSeed
|
<BranchSeed
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></BranchSeed>
|
></BranchSeed>
|
||||||
)
|
)
|
||||||
|
|
@ -64,7 +71,7 @@ const DialogShowComponent = (): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<QuestionDialog
|
<QuestionDialog
|
||||||
open={true}
|
open={true}
|
||||||
onDialogClose={() => dialogContext.setConfig({})}
|
onDialogClose={handleDialogClose}
|
||||||
{...dialogContext.config?.props}
|
{...dialogContext.config?.props}
|
||||||
></QuestionDialog>
|
></QuestionDialog>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue