Genel eksikler düzenlemeler

This commit is contained in:
Sedat Öztürk 2026-06-19 22:23:38 +03:00
parent 71b976b96b
commit 947d21ecb7
13 changed files with 659 additions and 418 deletions

View file

@ -693,8 +693,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
if (!Directory.Exists(fullPath))
{
Logger.LogWarning($"Directory not found: {fullPath}");
return items;
Logger.LogInformation($"Directory not found. Creating: {fullPath}");
Directory.CreateDirectory(fullPath);
}
var files = Directory.GetFiles(fullPath);

View file

@ -6648,6 +6648,12 @@
"tr": "Intranet",
"en": "Intranet"
},
{
"resourceName": "Platform",
"key": "App.Intranet.SocialLike",
"tr": "Sosyal Beğeniler",
"en": "Social Likes"
},
{
"resourceName": "Platform",
"key": "App.Intranet.SocialComment",

View file

@ -3423,7 +3423,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 400, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{
@ -3738,8 +3738,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField = "UserId", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "SubmissionTime", ColSpan=1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }
new EditingFormItemDto { Order = 2, DataField = "SubmissionTime", ColSpan=1, EditorType2 = EditorTypes.dxDateBox },
]}
}),
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
@ -3756,10 +3755,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
}
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
{
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
})
}, autoSave: true
);
@ -3819,22 +3814,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.DateTime,
FieldName = "CreationTime",
CaptionName = "App.Listform.ListformField.CreationTime",
Width = 0,
ListOrderNo = 4,
Visible = true,
IsActive = true,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
@ -3842,7 +3821,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
FieldName = "SurveyId",
CaptionName = "App.Listform.ListformField.SurveyId",
Width = 0,
ListOrderNo = 5,
ListOrderNo = 4,
Visible = false,
IsActive = true,
AllowSearch = true,
@ -4053,6 +4032,18 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
ChildFieldName = "SocialPostId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Intranet.SocialLike,
Code = AppCodes.Intranet.SocialLike,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SocialPostId"
}
}
}
})
}
@ -4269,6 +4260,114 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
}
#endregion
#region Social Like
listFormName = AppCodes.Intranet.SocialLike;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
PageSize = 10,
ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = false,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialLike)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson(),
HeaderFilterJson = DefaultHeaderFilterJson(),
SearchPanelJson = DefaultSearchPanelJson(),
GroupPanelJson = DefaultGroupPanelJson(),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson(),
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialLike)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "UserId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}
);
#region Social Like Fields
await _listFormFieldRepository.InsertManyAsync([
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
CaptionName = "App.Listform.ListformField.Id",
Width = 0,
ListOrderNo = 1,
Visible = false,
IsActive = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "UserId",
CaptionName = "App.Listform.ListformField.UserId",
Width = 0,
ListOrderNo = 2,
Visible = true,
IsActive = true,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.UserValues
}),
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "SocialPostId",
CaptionName = "App.Listform.ListformField.SocialPostId",
Width = 0,
ListOrderNo = 3,
Visible = false,
IsActive = true,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
]);
#endregion
}
#endregion
#region EventType
listFormName = AppCodes.Intranet.EventType;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -121,6 +121,12 @@ public static class ListFormSeeder_DefaultJsons
{
IsPivot = true
});
public static string DefaultGroupingJson(int groupIndex) => JsonSerializer.Serialize(new ColumnGroupingDto
{
AllowGrouping = true,
GroupIndex = groupIndex,
AutoExpandGroup = false
});
public static readonly string DefaultValidationRuleRequiredJson = JsonSerializer.Serialize(new ValidationRuleDto[]
{
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }

View file

@ -3297,7 +3297,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
PivotSettingsJson = DefaultPivotSettingsJson,
GroupingJson = DefaultGroupingJson(1)
},
new ListFormField
{
@ -3321,7 +3322,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
PivotSettingsJson = DefaultPivotSettingsJson,
GroupingJson = DefaultGroupingJson(2)
},
new ListFormField
{

View file

@ -3934,7 +3934,6 @@
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.Announcement.AnnouncementComment",
@ -3989,7 +3988,6 @@
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialPost",
@ -4116,6 +4114,60 @@
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike",
"ParentName": "App.Intranet",
"DisplayName": "App.Intranet.SocialLike",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike.Create",
"ParentName": "App.Intranet.SocialLike",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike.Update",
"ParentName": "App.Intranet.SocialLike",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike.Delete",
"ParentName": "App.Intranet.SocialLike",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike.Export",
"ParentName": "App.Intranet.SocialLike",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.SocialLike.Import",
"ParentName": "App.Intranet.SocialLike",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp|Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Intranet.Survey",

View file

@ -338,6 +338,7 @@ public static class SeedConsts
public const string SocialPost = Default + ".SocialPost";
public const string SocialComment = Default + ".SocialComment";
public const string SocialLike = Default + ".SocialLike";
public const string Events = Default + ".Events";
public const string EventType = Events + ".EventType";

View file

@ -1174,6 +1174,8 @@ public class PlatformDbContext :
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.AnnouncementLike)), Prefix.DbSchema);
b.ConfigureByConvention();
b.HasIndex(x => new { x.AnnouncementId, x.UserId }).IsUnique().HasFilter("[IsDeleted] = 0");
b.HasOne(x => x.Announcement)
.WithMany(x => x.AnnouncementLikes)
.HasForeignKey(x => x.AnnouncementId)
@ -1229,6 +1231,8 @@ public class PlatformDbContext :
b.Property(x => x.SubmissionTime).IsRequired();
b.HasIndex(x => new { x.SurveyId, x.UserId }).IsUnique().HasFilter("[IsDeleted] = 0");
b.HasOne(x => x.Survey)
.WithMany(x => x.SurveyResponses)
.HasForeignKey(x => x.SurveyId)
@ -1326,6 +1330,8 @@ public class PlatformDbContext :
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialLike)), Prefix.DbSchema);
b.ConfigureByConvention();
b.HasIndex(x => new { x.SocialPostId, x.UserId }).IsUnique().HasFilter("[IsDeleted] = 0");
b.HasOne(x => x.SocialPost)
.WithMany(x => x.Likes)
.HasForeignKey(x => x.SocialPostId)
@ -1396,6 +1402,8 @@ public class PlatformDbContext :
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventLike)), Prefix.DbSchema);
b.ConfigureByConvention();
b.HasIndex(x => new { x.EventId, x.UserId }).IsUnique().HasFilter("[IsDeleted] = 0");
b.HasOne(x => x.Event)
.WithMany(x => x.EventLikes)
.HasForeignKey(x => x.EventId)

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Sozsoft.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20260616123136_Initial")]
[Migration("20260619185755_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -912,7 +912,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("AnnouncementId");
b.HasIndex("AnnouncementId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_AnnouncementLike", (string)null);
});
@ -2512,7 +2514,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("EventId");
b.HasIndex("EventId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_EventLike", (string)null);
});
@ -4885,7 +4889,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("SocialPostId");
b.HasIndex("SocialPostId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_SocialLike", (string)null);
});
@ -5464,7 +5470,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("SurveyId");
b.HasIndex("SurveyId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_SurveyResponse", (string)null);
});

View file

@ -3626,9 +3626,11 @@ namespace Sozsoft.Platform.Migrations
column: "AnnouncementId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_AnnouncementLike_AnnouncementId",
name: "IX_Adm_T_AnnouncementLike_AnnouncementId_UserId",
table: "Adm_T_AnnouncementLike",
column: "AnnouncementId");
columns: new[] { "AnnouncementId", "UserId" },
unique: true,
filter: "[IsDeleted] = 0");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_Department_TenantId_Name",
@ -3667,9 +3669,11 @@ namespace Sozsoft.Platform.Migrations
column: "EventId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_EventLike_EventId",
name: "IX_Adm_T_EventLike_EventId_UserId",
table: "Adm_T_EventLike",
column: "EventId");
columns: new[] { "EventId", "UserId" },
unique: true,
filter: "[IsDeleted] = 0");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_EventType_TenantId_Name",
@ -3753,9 +3757,11 @@ namespace Sozsoft.Platform.Migrations
column: "SocialPostId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_SocialLike_SocialPostId",
name: "IX_Adm_T_SocialLike_SocialPostId_UserId",
table: "Adm_T_SocialLike",
column: "SocialPostId");
columns: new[] { "SocialPostId", "UserId" },
unique: true,
filter: "[IsDeleted] = 0");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_SocialLocation_SocialPostId",
@ -3802,9 +3808,11 @@ namespace Sozsoft.Platform.Migrations
column: "QuestionId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_SurveyResponse_SurveyId",
name: "IX_Adm_T_SurveyResponse_SurveyId_UserId",
table: "Adm_T_SurveyResponse",
column: "SurveyId");
columns: new[] { "SurveyId", "UserId" },
unique: true,
filter: "[IsDeleted] = 0");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_Videoroom_TenantId_BranchId_Name",

View file

@ -909,7 +909,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("AnnouncementId");
b.HasIndex("AnnouncementId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_AnnouncementLike", (string)null);
});
@ -2509,7 +2511,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("EventId");
b.HasIndex("EventId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_EventLike", (string)null);
});
@ -4882,7 +4886,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("SocialPostId");
b.HasIndex("SocialPostId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_SocialLike", (string)null);
});
@ -5461,7 +5467,9 @@ namespace Sozsoft.Platform.Migrations
b.HasKey("Id");
b.HasIndex("SurveyId");
b.HasIndex("SurveyId", "UserId")
.IsUnique()
.HasFilter("[IsDeleted] = 0");
b.ToTable("Adm_T_SurveyResponse", (string)null);
});

View file

@ -27,6 +27,7 @@ import {
FaSearch,
FaTimes,
FaTrash,
FaUsers,
} from 'react-icons/fa'
import { IoCheckmarkDone, IoChatbubbleEllipsesOutline, IoSend } from 'react-icons/io5'
import { useLocalization } from '@/utils/hooks/useLocalization'
@ -315,20 +316,33 @@ const MessengerWidget = () => {
if (!auth.session.signedIn) return null
const panelClassName = maximized
? 'pointer-events-auto fixed inset-2 overflow-hidden rounded-lg border border-gray-200 bg-white shadow-2xl dark:border-gray-700 dark:bg-gray-800 sm:inset-4'
: 'pointer-events-auto fixed inset-x-2 bottom-20 top-3 overflow-hidden rounded-lg border border-gray-200 bg-white shadow-2xl dark:border-gray-700 dark:bg-gray-800 sm:absolute sm:inset-auto sm:bottom-16 sm:right-0 sm:h-[min(70vh,640px)] sm:w-[min(78vw,800px)]'
? 'pointer-events-auto fixed inset-2 z-[51] overflow-hidden rounded-xl border border-blue-300 bg-slate-50 shadow-[0_24px_80px_rgba(15,23,42,0.45)] dark:border-blue-800 dark:bg-slate-900 sm:inset-4'
: 'pointer-events-auto fixed inset-x-2 bottom-20 top-3 z-[51] overflow-hidden rounded-xl border border-blue-300 bg-slate-50 shadow-[0_24px_80px_rgba(15,23,42,0.45)] dark:border-blue-800 dark:bg-slate-900 sm:inset-auto sm:bottom-20 sm:right-5 sm:h-[min(75vh,680px)] sm:w-[min(78vw,800px)]'
const headerActionClassName = 'text-white hover:bg-white/15 hover:text-white active:bg-white/25'
return (
<div className="pointer-events-none fixed bottom-5 right-5 z-50 h-14 w-14">
<>
{open && (
<div className={panelClassName}>
<>
<button
type="button"
aria-label={translate('::MessengerWidget.Minimize')}
className="fixed inset-0 z-50 cursor-default bg-slate-950/25 backdrop-blur-[1px] dark:bg-black/55"
onClick={closeWidget}
/>
<div className={panelClassName} role="dialog" aria-modal="true">
<div className="flex h-full min-h-0">
<aside
className={`min-h-0 w-full shrink-0 flex-col border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-900 sm:flex sm:w-72 sm:border-r ${
className={`min-h-0 w-full shrink-0 flex-col bg-slate-100 dark:bg-slate-950 sm:flex sm:w-72 ${
selectedIds.length > 0 ? 'hidden' : 'flex'
}`}
>
<div className="flex h-16 items-center justify-between border-b border-gray-200 px-4 dark:border-gray-700">
<div
className={
'flex h-16 items-center justify-between border-b border-r-2 border-blue-500/40 bg-blue-700 px-4 text-white dark:bg-blue-950'
}
>
<div className="flex min-w-0 items-center gap-3">
<Avatar
size={36}
@ -336,10 +350,12 @@ const MessengerWidget = () => {
src={auth.user.avatar || AVATAR_URL(auth.user.id, tenantId)}
/>
<div className="min-w-0">
<div className="truncate text-sm font-semibold text-gray-900 dark:text-gray-100">
{auth.user.name || auth.user.userName || translate('::MessengerWidget.Title')}
<div className="truncate text-sm font-semibold text-white">
{auth.user.name ||
auth.user.userName ||
translate('::MessengerWidget.Title')}
</div>
<div className="flex items-center gap-1 text-xs text-gray-500">
<div className="flex items-center gap-1 text-xs text-blue-100">
<span
className={`h-2 w-2 rounded-full ${connected ? 'bg-emerald-500' : 'bg-gray-400'}`}
/>
@ -361,14 +377,22 @@ const MessengerWidget = () => {
size="xs"
variant="plain"
icon={maximized ? <FaCompress /> : <FaExpand />}
className={headerActionClassName}
onClick={() => setMaximized((value) => !value)}
/>
</Tooltip>
<Button size="xs" variant="plain" icon={<FaTimes />} onClick={closeWidget} />
<Button
size="xs"
variant="plain"
icon={<FaTimes />}
className={headerActionClassName}
onClick={closeWidget}
/>
</div>
</div>
<div className="space-y-2 p-3">
<div className="flex items-center gap-2 p-3">
<div className="min-w-0 flex-[6]">
<Input
size="sm"
value={filter}
@ -376,16 +400,20 @@ const MessengerWidget = () => {
placeholder={translate('::MessengerWidget.SearchPerson')}
onChange={(event) => setFilter(event.target.value)}
/>
</div>
<Button
size="xs"
size="sm"
variant={multiSelect ? 'twoTone' : 'default'}
block
icon={<FaUsers />}
className="flex-1 shrink-0"
aria-label={translate('::MessengerWidget.MultiSelect')}
onClick={toggleMultiSelect}
>
{multiSelect
? translate('::MessengerWidget.MultiSelectEnabled')
: translate('::MessengerWidget.MultiSelect')}
</Button>
title={
multiSelect
? translate('::MessengerWidget.MultiSelect')
: translate('::MessengerWidget.MultiSelectEnabled')
}
/>
</div>
<div className="min-h-0 flex-1 overflow-y-auto px-2 pb-2">
@ -416,7 +444,7 @@ const MessengerWidget = () => {
{contact.fullName}
</span>
<span
className={`mt-1 inline-flex items-center gap-1 text-xs font-medium ${
className={`inline-flex items-center gap-1 text-xs font-medium ${
contact.isOnline ? 'text-emerald-600' : 'text-red-500'
}`}
>
@ -449,13 +477,17 @@ const MessengerWidget = () => {
selectedIds.length === 0 ? 'hidden sm:flex' : 'flex'
}`}
>
<div className="flex h-16 items-center justify-between border-b border-gray-200 px-4 dark:border-gray-700">
<div
className={
'flex h-16 items-center justify-between border-b border-blue-500/40 bg-blue-700 px-4 text-white dark:bg-blue-950'
}
>
<div className="flex min-w-0 items-center gap-3">
<Button
size="xs"
variant="plain"
icon={<FaArrowLeft />}
className="shrink-0 sm:hidden"
className={`shrink-0 sm:hidden ${headerActionClassName}`}
onClick={() => setSelectedIds([])}
/>
{selectedContacts.length === 1 && (
@ -474,14 +506,14 @@ const MessengerWidget = () => {
</Avatar>
)}
<div className="min-w-0 flex-1">
<div className="truncate text-sm font-semibold text-gray-900 dark:text-gray-100">
<div className="truncate text-sm font-semibold text-white">
{selectedContacts.length === 1
? selectedContacts[0].fullName
: selectedContacts.length > 1
? `${selectedContacts.length} ${translate('::MessengerWidget.PeopleSelected')}`
: translate('::MessengerWidget.Chat')}
</div>
<div className="truncate text-xs text-gray-500">
<div className="truncate text-xs text-blue-100">
{selectedContacts.length === 1
? `${selectedContacts[0].isOnline ? translate('::MessengerWidget.Online') : translate('::MessengerWidget.Offline')} - ${
selectedContacts[0].email || selectedContacts[0].userName
@ -495,25 +527,29 @@ const MessengerWidget = () => {
</div>
</div>
<div className="flex shrink-0 items-center gap-1">
<Tooltip
<Button
size="xs"
variant="plain"
icon={maximized ? <FaCompress /> : <FaExpand />}
className={headerActionClassName}
onClick={() => setMaximized((value) => !value)}
title={
maximized
? translate('::MessengerWidget.Minimize')
: translate('::MessengerWidget.Maximize')
}
>
/>
<Button
size="xs"
variant="plain"
icon={maximized ? <FaCompress /> : <FaExpand />}
onClick={() => setMaximized((value) => !value)}
icon={<FaTimes />}
className={headerActionClassName}
onClick={closeWidget}
/>
</Tooltip>
<Button size="xs" variant="plain" icon={<FaTimes />} onClick={closeWidget} />
</div>
</div>
<div className="flex-1 overflow-y-auto bg-white px-4 py-3 dark:bg-gray-800">
<div className="flex-1 overflow-y-auto bg-slate-50 px-4 py-3 dark:bg-slate-900">
{visibleMessages.length === 0 && (
<div className="flex h-full items-center justify-center text-sm text-gray-400">
{translate('::MessengerWidget.NoMessagesYet')}
@ -705,8 +741,10 @@ const MessengerWidget = () => {
</main>
</div>
</div>
</>
)}
<div className="fixed bottom-5 right-5 z-[52]">
<Tooltip title={translate('::MessengerWidget.Title')}>
<button
type="button"
@ -722,6 +760,7 @@ const MessengerWidget = () => {
</button>
</Tooltip>
</div>
</>
)
}

View file

@ -282,6 +282,10 @@ div.dialog-after-open > div.dialog-content.maximized {
margin-left: 2px !important;
}
.dx-datagrid-rowsview .dx-datagrid-group-row-container {
background-color: transparent !important;
}
@media (max-width: 767px), (pointer: coarse) {
.mobile-edit-popup.dx-overlay-wrapper,
.dx-overlay-wrapper.mobile-edit-popup {