Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
portal-apps-manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
portal-apps-manage
Commits
73d25d52
Commit
73d25d52
authored
Oct 21, 2025
by
sawit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ปรับขนาด modal config และ data grid
parent
185d9aee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
43 deletions
+61
-43
dashboard-management.component.ts
...ge/dashboard-management/dashboard-management.component.ts
+4
-2
syncfusion-datagrid-config.component.ts
...n-datagrid-config/syncfusion-datagrid-config.component.ts
+46
-39
syncfusion-datagrid-widget.component.ts
...n-datagrid-widget/syncfusion-datagrid-widget.component.ts
+11
-2
No files found.
src/app/portal-manage/dashboard-management/dashboard-management.component.ts
View file @
73d25d52
...
@@ -431,8 +431,10 @@ export class DashboardManagementComponent implements OnInit, OnDestroy {
...
@@ -431,8 +431,10 @@ export class DashboardManagementComponent implements OnInit, OnDestroy {
const
availableColumns
=
selectedDataset
?
selectedDataset
.
columns
:
[];
const
availableColumns
=
selectedDataset
?
selectedDataset
.
columns
:
[];
const
dialogRef
=
this
.
dialog
.
open
(
WidgetConfigComponent
,
{
const
dialogRef
=
this
.
dialog
.
open
(
WidgetConfigComponent
,
{
width
:
'600px'
,
width
:
'1200px'
,
data
:
{
widget
,
availableColumns
}
height
:
'80vh'
,
panelClass
:
'custom-widget-config-dialog'
,
data
:
{
widget
,
availableColumns
,
currentConfig
:
widget
.
config
}
// Pass current config for editing
});
});
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
...
...
src/app/portal-manage/dashboard-management/widgets/configs/syncfusion-datagrid-config/syncfusion-datagrid-config.component.ts
View file @
73d25d52
...
@@ -82,22 +82,21 @@ import { BaseConfigComponent } from '../../../widget-config/base-config/base-con
...
@@ -82,22 +82,21 @@ import { BaseConfigComponent } from '../../../widget-config/base-config/base-con
</h3>
</h3>
<!-- Size Presets -->
<!-- Size Presets -->
<div class="size-presets">
<div class="size-presets
mt-4
">
<h4 class="text-sm font-medium text-gray-700 mb-3">Quick Presets</h4>
<h4 class="text-sm font-medium text-gray-700 mb-3">Quick Presets</h4>
<div class="grid grid-cols-2
md:grid-cols-4
gap-3">
<div class="grid grid-cols-2
sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6
gap-3">
<
div
<
button
*ngFor="let option of sizeOptions; trackBy: trackBySizeOption"
*ngFor="let option of sizeOptions; trackBy: trackBySizeOption"
class="size-preset-card"
type="button"
class="size-preset-btn"
[class.selected]="currentConfig.sizeOption === option.id"
[class.selected]="currentConfig.sizeOption === option.id"
(click)="setSizeOption(option.id)">
(click)="setSizeOption(option.id)"
<div class="preset-icon">
[attr.aria-pressed]="currentConfig.sizeOption === option.id">
<i [class]="getSizeIcon(option.id)"></i>
</div>
<div class="preset-info">
<div class="preset-info">
<
h5>{{ option.label }}</h5
>
<
span class="preset-label">{{ option.label }}</span
>
<
p>{{ option.description }}</p
>
<
span class="preset-description">{{ option.description }}</span
>
</div>
</div>
</
div
>
</
button
>
</div>
</div>
</div>
</div>
...
@@ -1004,35 +1003,55 @@ import { BaseConfigComponent } from '../../../widget-config/base-config/base-con
...
@@ -1004,35 +1003,55 @@ import { BaseConfigComponent } from '../../../widget-config/base-config/base-con
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.size-option {
.size-preset-btn {
padding: 16px;
display: flex;
border: 2px solid #e5e7eb;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 12px 8px;
border: 1px solid #e2e8f0;
border-radius: 8px;
border-radius: 8px;
cursor: pointer;
cursor: pointer;
transition: all 0.2s;
transition: all 0.25s ease-in-out;
background: white;
background-color: #ffffff;
text-align: center;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
}
.size-option:hover {
.size-preset-btn:hover {
transform: translateY(-2px);
border-color: #3b82f6;
border-color: #3b82f6;
background: #f0f9ff;
box-shadow: 0 4px 12px 0 rgba(59, 130, 246, 0.2);
background-color: #f7faff;
}
}
.size-option.selected {
.size-preset-btn.selected {
border-color: #3b82f6;
border-color: #2563eb;
background: #dbeafe;
background-color: #eff6ff;
color: #2563eb;
box-shadow: 0 2px 6px 0 rgba(37, 99, 235, 0.25);
transform: translateY(-1px);
}
}
.size-option h4 {
margin: 0 0 8px 0;
font-size: 1rem;
.size-preset-btn .preset-info {
display: flex;
flex-direction: column;
}
.size-preset-btn .preset-label {
font-weight: 600;
font-weight: 600;
font-size: 0.875rem;
color: #374151;
color: #374151;
}
}
.size-option p {
.size-preset-btn.selected .preset-label {
margin: 0;
color: #1e40af;
font-size: 0.875rem;
}
.size-preset-btn .preset-description {
font-size: 0.75rem;
color: #6b7280;
color: #6b7280;
}
}
...
@@ -1271,18 +1290,6 @@ export class SyncfusionDatagridConfigComponent extends BaseConfigComponent imple
...
@@ -1271,18 +1290,6 @@ export class SyncfusionDatagridConfigComponent extends BaseConfigComponent imple
this
.
configChange
.
emit
(
this
.
currentConfig
);
this
.
configChange
.
emit
(
this
.
currentConfig
);
}
}
getSizeIcon
(
optionId
:
string
):
string
{
const
iconMap
:
{
[
key
:
string
]:
string
}
=
{
'small'
:
'fas fa-expand-arrows-alt'
,
'medium'
:
'fas fa-th-large'
,
'large'
:
'fas fa-expand'
,
'full-width'
:
'fas fa-arrows-alt-h'
,
'full-height'
:
'fas fa-arrows-alt-v'
,
'full-panel'
:
'fas fa-expand-arrows-alt'
,
'custom'
:
'fas fa-cog'
};
return
iconMap
[
optionId
]
||
'fas fa-th'
;
}
setFullPanel
(
type
:
'width'
|
'height'
):
void
{
setFullPanel
(
type
:
'width'
|
'height'
):
void
{
if
(
type
===
'width'
)
{
if
(
type
===
'width'
)
{
...
...
src/app/portal-manage/dashboard-management/widgets/syncfusion-datagrid-widget/syncfusion-datagrid-widget.component.ts
View file @
73d25d52
...
@@ -903,27 +903,35 @@ export class SyncfusionDatagridWidgetComponent extends BaseWidgetComponent imple
...
@@ -903,27 +903,35 @@ export class SyncfusionDatagridWidgetComponent extends BaseWidgetComponent imple
if
(
optionId
===
'small'
)
{
if
(
optionId
===
'small'
)
{
this
.
width
=
400
;
this
.
width
=
400
;
this
.
height
=
300
;
this
.
height
=
300
;
this
.
widthUnit
=
'px'
;
this
.
heightUnit
=
'px'
;
this
.
fullWidth
=
false
;
this
.
fullWidth
=
false
;
this
.
fullHeight
=
false
;
this
.
fullHeight
=
false
;
}
else
if
(
optionId
===
'medium'
)
{
}
else
if
(
optionId
===
'medium'
)
{
this
.
width
=
600
;
this
.
width
=
600
;
this
.
height
=
400
;
this
.
height
=
400
;
this
.
widthUnit
=
'px'
;
this
.
heightUnit
=
'px'
;
this
.
fullWidth
=
false
;
this
.
fullWidth
=
false
;
this
.
fullHeight
=
false
;
this
.
fullHeight
=
false
;
}
else
if
(
optionId
===
'large'
)
{
}
else
if
(
optionId
===
'large'
)
{
this
.
width
=
800
;
this
.
width
=
800
;
this
.
height
=
600
;
this
.
height
=
600
;
this
.
widthUnit
=
'px'
;
this
.
heightUnit
=
'px'
;
this
.
fullWidth
=
false
;
this
.
fullWidth
=
false
;
this
.
fullHeight
=
false
;
this
.
fullHeight
=
false
;
}
else
if
(
optionId
===
'full-width'
)
{
}
else
if
(
optionId
===
'full-width'
)
{
this
.
width
=
100
;
this
.
width
=
100
;
this
.
height
=
400
;
this
.
height
=
400
;
// Keep original height or make it configurable
this
.
widthUnit
=
'%'
;
this
.
widthUnit
=
'%'
;
this
.
heightUnit
=
'px'
;
this
.
fullWidth
=
true
;
this
.
fullWidth
=
true
;
this
.
fullHeight
=
false
;
this
.
fullHeight
=
false
;
}
else
if
(
optionId
===
'full-height'
)
{
}
else
if
(
optionId
===
'full-height'
)
{
this
.
width
=
600
;
this
.
width
=
600
;
// Keep original width or make it configurable
this
.
height
=
100
;
this
.
height
=
100
;
this
.
widthUnit
=
'px'
;
this
.
heightUnit
=
'%'
;
this
.
heightUnit
=
'%'
;
this
.
fullWidth
=
false
;
this
.
fullWidth
=
false
;
this
.
fullHeight
=
true
;
this
.
fullHeight
=
true
;
...
@@ -935,6 +943,7 @@ export class SyncfusionDatagridWidgetComponent extends BaseWidgetComponent imple
...
@@ -935,6 +943,7 @@ export class SyncfusionDatagridWidgetComponent extends BaseWidgetComponent imple
this
.
fullWidth
=
true
;
this
.
fullWidth
=
true
;
this
.
fullHeight
=
true
;
this
.
fullHeight
=
true
;
}
}
// For 'custom', we don't change anything, just allow manual input.
}
}
getSizeIcon
(
optionId
:
string
):
string
{
getSizeIcon
(
optionId
:
string
):
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment