Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lamarts mobile app angular
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Arko Dey Bhowmick
Lamarts mobile app angular
Commits
9b474451
Commit
9b474451
authored
Apr 05, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove any
parent
7518dedf
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
95 additions
and
166 deletions
+95
-166
src/app/component-library/custom-table/custom-table.component.ts
.../component-library/custom-table/custom-table.component.ts
+11
-10
src/app/component-library/interface/custom-table-column.ts
src/app/component-library/interface/custom-table-column.ts
+5
-0
src/app/portal/assignment/assignment/assignment.component.ts
src/app/portal/assignment/assignment/assignment.component.ts
+6
-6
src/app/portal/assignment/interface/assignment-table.ts
src/app/portal/assignment/interface/assignment-table.ts
+11
-0
src/app/portal/assignment/service/prepare-assignment-table-data.service.ts
...signment/service/prepare-assignment-table-data.service.ts
+13
-13
src/app/portal/data-source/interface/data.ts
src/app/portal/data-source/interface/data.ts
+3
-3
src/app/portal/data-source/interface/foreignKeyListForDataSource.ts
...rtal/data-source/interface/foreignKeyListForDataSource.ts
+4
-4
src/app/portal/exam/exam/exam.component.ts
src/app/portal/exam/exam/exam.component.ts
+5
-4
src/app/portal/exam/manage/manage.component.ts
src/app/portal/exam/manage/manage.component.ts
+2
-2
src/app/portal/exam/service/prepare-exam-table-data.service.ts
...pp/portal/exam/service/prepare-exam-table-data.service.ts
+2
-1
src/app/portal/routine/interface/routine-table.ts
src/app/portal/routine/interface/routine-table.ts
+10
-0
src/app/portal/routine/manage/manage.component.ts
src/app/portal/routine/manage/manage.component.ts
+1
-1
src/app/portal/routine/routine/routine.component.ts
src/app/portal/routine/routine/routine.component.ts
+6
-5
src/app/portal/routine/service/prepare-routine-table-data.service.ts
...tal/routine/service/prepare-routine-table-data.service.ts
+13
-11
src/app/portal/service/url-config.service.ts
src/app/portal/service/url-config.service.ts
+0
-2
src/app/raintree/transmission/coa-table.service.spec.ts
src/app/raintree/transmission/coa-table.service.spec.ts
+0
-16
src/app/raintree/transmission/coa-table.service.ts
src/app/raintree/transmission/coa-table.service.ts
+0
-86
src/app/raintree/transmission/routine-transmission.service.ts
...app/raintree/transmission/routine-transmission.service.ts
+3
-2
No files found.
src/app/component-library/custom-table/custom-table.component.ts
View file @
9b474451
...
@@ -3,6 +3,7 @@ import { Component, EventEmitter, inject, Input, Output } from '@angular/core';
...
@@ -3,6 +3,7 @@ import { Component, EventEmitter, inject, Input, Output } from '@angular/core';
import
{
MatTableModule
}
from
'
@angular/material/table
'
;
import
{
MatTableModule
}
from
'
@angular/material/table
'
;
import
{
MatPaginator
}
from
'
@angular/material/paginator
'
;
import
{
MatPaginator
}
from
'
@angular/material/paginator
'
;
import
{
AuthService
}
from
'
../../auth/service/auth.service
'
;
import
{
AuthService
}
from
'
../../auth/service/auth.service
'
;
import
{
CustomTableColumn
}
from
'
../interface/custom-table-column
'
;
@
Component
({
@
Component
({
selector
:
'
app-custom-table
'
,
selector
:
'
app-custom-table
'
,
...
@@ -18,18 +19,18 @@ import { AuthService } from '../../auth/service/auth.service';
...
@@ -18,18 +19,18 @@ import { AuthService } from '../../auth/service/auth.service';
'
../../style-guide/css/table-theme.scss
'
'
../../style-guide/css/table-theme.scss
'
]
]
})
})
export
class
CustomTableComponent
{
export
class
CustomTableComponent
<
T
>
{
@
Input
()
columns
:
{
key
:
string
;
label
:
string
;
isVisible
?:
boolean
}
[]
=
[];
// Define columns dynamically
@
Input
()
columns
:
CustomTableColumn
[]
=
[];
// Define columns dynamically
@
Input
()
data
:
any
[]
=
[];
// Table data
@
Input
()
data
:
T
[]
=
[];
// Table data
@
Input
()
count
:
number
=
0
;
// Table data
@
Input
()
count
:
number
=
0
;
// Table data
@
Input
()
pageSize
:
number
=
0
;
// Table data
@
Input
()
pageSize
:
number
=
0
;
// Table data
@
Output
()
emitView
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
emitView
:
EventEmitter
<
T
>
=
new
EventEmitter
<
T
>
();
@
Output
()
emitEdit
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
emitEdit
:
EventEmitter
<
T
>
=
new
EventEmitter
<
T
>
();
@
Output
()
emitDelete
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
emitDelete
:
EventEmitter
<
T
>
=
new
EventEmitter
<
T
>
();
public
authService
=
inject
(
AuthService
);
public
authService
=
inject
(
AuthService
);
...
@@ -48,19 +49,19 @@ export class CustomTableComponent {
...
@@ -48,19 +49,19 @@ export class CustomTableComponent {
}
}
public
view
(
data
:
any
):
void
{
public
view
(
data
:
T
):
void
{
this
.
emitView
.
emit
(
data
);
this
.
emitView
.
emit
(
data
);
}
}
public
edit
(
data
:
any
):
void
{
public
edit
(
data
:
T
):
void
{
this
.
emitEdit
.
emit
(
data
);
this
.
emitEdit
.
emit
(
data
);
}
}
public
delete
(
data
:
any
):
void
{
public
delete
(
data
:
T
):
void
{
this
.
emitDelete
.
emit
(
data
);
this
.
emitDelete
.
emit
(
data
);
}
}
onPageChanged
(
event
:
any
):
void
{
public
onPageChanged
<
T
>
(
event
:
T
):
void
{
console
.
log
(
"
event
"
);
console
.
log
(
"
event
"
);
console
.
log
(
event
);
console
.
log
(
event
);
...
...
src/app/component-library/interface/custom-table-column.ts
0 → 100644
View file @
9b474451
export
interface
CustomTableColumn
{
key
:
string
;
label
:
string
;
isVisible
?:
boolean
}
\ No newline at end of file
src/app/portal/assignment/assignment/assignment.component.ts
View file @
9b474451
...
@@ -4,10 +4,8 @@ import { MatDialog } from '@angular/material/dialog';
...
@@ -4,10 +4,8 @@ import { MatDialog } from '@angular/material/dialog';
import
{
ManageComponent
}
from
'
../manage/manage.component
'
;
import
{
ManageComponent
}
from
'
../manage/manage.component
'
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
AssignmentTransmissionService
}
from
'
../../../raintree/transmission/assignment-transmission.service
'
;
import
{
AssignmentTransmissionService
}
from
'
../../../raintree/transmission/assignment-transmission.service
'
;
import
{
AssignmentsResponse
}
from
'
../../../raintree/interface/assignment-respons
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
Assignment
}
from
'
../interface/assignment
'
;
import
{
PrepareAssignmentTableDataService
}
from
'
../service/prepare-assignment-table-data.service
'
;
import
{
PrepareAssignmentTableDataService
}
from
'
../service/prepare-assignment-table-data.service
'
;
import
{
DataSourceService
}
from
'
../../service/data-source.service
'
;
import
{
DataSourceService
}
from
'
../../service/data-source.service
'
;
import
{
AuthService
}
from
'
../../../auth/service/auth.service
'
;
import
{
AuthService
}
from
'
../../../auth/service/auth.service
'
;
...
@@ -16,6 +14,8 @@ import { RaintreeResponse } from '../../../raintree/interface/raintree-response'
...
@@ -16,6 +14,8 @@ import { RaintreeResponse } from '../../../raintree/interface/raintree-response'
import
{
MatDialogConfigService
}
from
'
../../service/mat-dialog-config.service
'
;
import
{
MatDialogConfigService
}
from
'
../../service/mat-dialog-config.service
'
;
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
AssignmentTable
}
from
'
../interface/assignment-table
'
;
@
Component
({
@
Component
({
selector
:
'
app-assignment
'
,
selector
:
'
app-assignment
'
,
...
@@ -40,9 +40,9 @@ export class AssignmentComponent implements OnInit {
...
@@ -40,9 +40,9 @@ export class AssignmentComponent implements OnInit {
private
_toaster
:
ToasterService
private
_toaster
:
ToasterService
)
{
}
)
{
}
public
columns
:
any
[]
=
[];
public
columns
:
CustomTableColumn
[]
=
[];
public
data
:
any
[]
=
[];
public
data
:
AssignmentTable
[]
=
[];
public
ngOnInit
():
void
{
public
ngOnInit
():
void
{
this
.
columns
=
this
.
_prepareAssignmentTableData
.
prepareMatTableColumn
();
this
.
columns
=
this
.
_prepareAssignmentTableData
.
prepareMatTableColumn
();
...
@@ -80,12 +80,12 @@ export class AssignmentComponent implements OnInit {
...
@@ -80,12 +80,12 @@ export class AssignmentComponent implements OnInit {
)
)
}
}
public
emitViewFromTable
(
emitData
:
any
):
void
{
public
emitViewFromTable
(
emitData
:
AssignmentTable
):
void
{
let
docLink
=
emitData
.
document
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
let
docLink
=
emitData
.
document
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
window
.
open
(
docLink
,
'
_blank
'
);
window
.
open
(
docLink
,
'
_blank
'
);
}
}
public
emitDeleteFromTable
(
emitData
:
any
):
void
{
public
emitDeleteFromTable
(
emitData
:
AssignmentTable
):
void
{
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
...
...
src/app/portal/assignment/interface/assignment-table.ts
0 → 100644
View file @
9b474451
export
interface
AssignmentTable
{
id
:
string
;
subject
?:
string
,
section_details
?:
string
;
session_name
?:
string
;
assigned_on
?:
string
;
last_date
:
string
;
document
:
string
;
action
:
string
[]
}
\ No newline at end of file
src/app/portal/assignment/service/prepare-assignment-table-data.service.ts
View file @
9b474451
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Assignment
}
from
'
../interface/assignment
'
;
import
{
Assignment
}
from
'
../interface/assignment
'
;
import
{
AssignmentTable
}
from
'
../interface/assignment-table
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -8,27 +10,25 @@ export class PrepareAssignmentTableDataService {
...
@@ -8,27 +10,25 @@ export class PrepareAssignmentTableDataService {
constructor
()
{
}
constructor
()
{
}
public
prepareMatTableData
(
data
:
Assignment
[]):
any
{
public
prepareMatTableData
(
data
:
Assignment
[]):
AssignmentTable
[]
{
let
dataArray
=
data
.
map
((
assignment
:
Assignment
)
=>
{
return
data
.
map
((
assignment
:
Assignment
)
=>
{
return
{
return
{
[
'
id
'
]
:
assignment
.
id
,
id
:
assignment
.
id
,
[
'
subject
'
]
:
assignment
.
subject_subject_name
?.
en
,
subject
:
assignment
.
subject_subject_name
?.
en
,
[
'
section_details
'
]
:
assignment
.
section_details
?.
en
,
section_details
:
assignment
.
section_details
?.
en
,
[
'
session_name
'
]
:
assignment
.
session_session_name
?.
en
,
session_name
:
assignment
.
session_session_name
?.
en
,
[
'
assigned_on
'
]
:
assignment
.
assigned_on
?.
en
,
assigned_on
:
assignment
.
assigned_on
?.
en
,
[
'
last_date
'
]
:
assignment
.
last_submission_date
[
'
en
'
],
last_date
:
assignment
.
last_submission_date
[
'
en
'
],
[
'
document
'
]
:
assignment
.
docs
[
'
en
'
],
document
:
assignment
.
docs
[
'
en
'
],
[
'
action
'
]
:
[
'
view
'
,
'
delete
'
]
action
:
[
'
view
'
,
'
delete
'
]
}
}
})
})
return
dataArray
;
}
}
public
prepareMatTableColumn
():
any
[]
{
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
let
columnArray
=
[
let
columnArray
=
[
{
key
:
'
section_details
'
,
label
:
'
Section
'
},
{
key
:
'
section_details
'
,
label
:
'
Section
'
},
...
...
src/app/portal/data-source/interface/data.ts
View file @
9b474451
...
@@ -7,13 +7,13 @@ export interface Data {
...
@@ -7,13 +7,13 @@ export interface Data {
dataSourceName
:
string
;
dataSourceName
:
string
;
websiteId
?:
number
;
websiteId
?:
number
;
type
:
string
;
type
:
string
;
foreignKeyMapping
?:
any
;
foreignKeyMapping
?:
string
;
foreignKeyMap
?:
ForeignKeyMap
;
foreignKeyMap
?:
ForeignKeyMap
;
requiredPresentationField
?:
string
;
requiredPresentationField
?:
string
;
favourite
?:
boolean
;
favourite
?:
boolean
;
icon
?:
string
;
icon
?:
string
;
dependentFields
?:
any
;
dependentFields
?:
string
;
dsType
?:
any
;
dsType
?:
string
;
[
index
:
string
]:
any
;
[
index
:
string
]:
any
;
}
}
\ No newline at end of file
src/app/portal/data-source/interface/foreignKeyListForDataSource.ts
View file @
9b474451
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
export
interface
ForeignKeyListForDataSource
{
export
interface
ForeignKeyListForDataSource
{
fieldName
:
string
;
fieldName
:
string
;
foreignTableId
:
number
;
foreignTableId
:
number
;
presentationFieldPattern
:
any
;
presentationFieldPattern
:
string
;
presenterField
:
any
;
presenterField
:
string
;
isMultiSelect
:
boolean
;
isMultiSelect
:
boolean
;
foreignUniqueField
:
any
;
foreignUniqueField
:
string
;
id
:
any
;
id
:
string
;
remotePresenterField
:
string
;
remotePresenterField
:
string
;
}
}
\ No newline at end of file
src/app/portal/exam/exam/exam.component.ts
View file @
9b474451
...
@@ -15,6 +15,7 @@ import { MatDialogConfigService } from '../../service/mat-dialog-config.service'
...
@@ -15,6 +15,7 @@ import { MatDialogConfigService } from '../../service/mat-dialog-config.service'
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
ExamTable
}
from
'
../interface/exam-table
'
;
import
{
ExamTable
}
from
'
../interface/exam-table
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
@
Component
({
@
Component
({
selector
:
'
app-exam
'
,
selector
:
'
app-exam
'
,
...
@@ -39,9 +40,9 @@ export class ExamComponent {
...
@@ -39,9 +40,9 @@ export class ExamComponent {
public
authService
:
AuthService
public
authService
:
AuthService
)
{
}
)
{
}
public
columns
:
any
=
[];
public
columns
:
CustomTableColumn
[]
=
[];
public
data
:
any
=
[];
public
data
:
ExamTable
[]
=
[];
ngOnInit
():
void
{
ngOnInit
():
void
{
...
@@ -49,13 +50,13 @@ export class ExamComponent {
...
@@ -49,13 +50,13 @@ export class ExamComponent {
this
.
_getExamSchedule
();
this
.
_getExamSchedule
();
}
}
public
emitViewFromTable
(
emitData
:
any
)
{
public
emitViewFromTable
(
emitData
:
ExamTable
)
{
let
docLink
=
emitData
.
image
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
let
docLink
=
emitData
.
image
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
window
.
open
(
docLink
,
'
_blank
'
);
window
.
open
(
docLink
,
'
_blank
'
);
}
}
public
emitDeleteFromTable
(
emitData
:
any
):
void
{
public
emitDeleteFromTable
(
emitData
:
ExamTable
):
void
{
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
...
...
src/app/portal/exam/manage/manage.component.ts
View file @
9b474451
...
@@ -36,7 +36,7 @@ import { ExamSchedules } from "../interface/exam-schedule";
...
@@ -36,7 +36,7 @@ import { ExamSchedules } from "../interface/exam-schedule";
export
class
ManageComponent
{
export
class
ManageComponent
{
constructor
(
constructor
(
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
any
,
// @Inject(MAT_DIALOG_DATA) public data: string
,
private
_fileUpload
:
FileUploadTransmissionService
,
private
_fileUpload
:
FileUploadTransmissionService
,
private
_auth
:
AuthService
,
private
_auth
:
AuthService
,
private
_classTransmission
:
ClassTransmissionService
,
private
_classTransmission
:
ClassTransmissionService
,
...
@@ -51,7 +51,7 @@ export class ManageComponent {
...
@@ -51,7 +51,7 @@ export class ManageComponent {
class
:
new
FormControl
(
""
,
[
Validators
.
required
]),
class
:
new
FormControl
(
""
,
[
Validators
.
required
]),
term
:
new
FormControl
(
""
,
[
Validators
.
required
]),
term
:
new
FormControl
(
""
,
[
Validators
.
required
]),
details
:
new
FormControl
(
""
,
[
Validators
.
required
]),
details
:
new
FormControl
(
""
,
[
Validators
.
required
]),
document
:
new
FormControl
(
""
,
[
Validators
.
required
]
),
document
:
new
FormControl
(
""
),
});
});
public
ngOnInit
():
void
{
public
ngOnInit
():
void
{
...
...
src/app/portal/exam/service/prepare-exam-table-data.service.ts
View file @
9b474451
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
ExamSchedule
}
from
'
../interface/exam-schedule
'
;
import
{
ExamSchedule
}
from
'
../interface/exam-schedule
'
;
import
{
ExamTable
}
from
'
../interface/exam-table
'
;
import
{
ExamTable
}
from
'
../interface/exam-table
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -27,7 +28,7 @@ export class PrepareExamTableDataService {
...
@@ -27,7 +28,7 @@ export class PrepareExamTableDataService {
}
}
public
prepareMatTableColumn
():
any
[]
{
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
let
columnArray
=
[
let
columnArray
=
[
{
key
:
'
class_details
'
,
label
:
'
Class
'
},
{
key
:
'
class_details
'
,
label
:
'
Class
'
},
...
...
src/app/portal/routine/interface/routine-table.ts
0 → 100644
View file @
9b474451
export
interface
RoutineTable
{
id
:
string
;
session_session_name
?:
string
,
class_details
?:
string
;
section_details
?:
string
;
routine_type
:
string
;
schedule
:
string
;
action
:
string
[]
}
\ No newline at end of file
src/app/portal/routine/manage/manage.component.ts
View file @
9b474451
...
@@ -48,7 +48,7 @@ import { ToasterService } from "../../../component-library/toaster/toaster.servi
...
@@ -48,7 +48,7 @@ import { ToasterService } from "../../../component-library/toaster/toaster.servi
})
})
export
class
ManageComponent
{
export
class
ManageComponent
{
constructor
(
constructor
(
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
any
,
//
@Inject(MAT_DIALOG_DATA) public data: any,
private
_classTransmission
:
ClassTransmissionService
,
private
_classTransmission
:
ClassTransmissionService
,
private
_urlConfig
:
UrlConfigService
,
private
_urlConfig
:
UrlConfigService
,
private
_routineTransmission
:
RoutineTransmissionService
,
private
_routineTransmission
:
RoutineTransmissionService
,
...
...
src/app/portal/routine/routine/routine.component.ts
View file @
9b474451
...
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
...
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import
{
RoutineTransmissionService
}
from
'
../../../raintree/transmission/routine-transmission.service
'
;
import
{
RoutineTransmissionService
}
from
'
../../../raintree/transmission/routine-transmission.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
DataSourceService
}
from
'
../../service/data-source.service
'
;
import
{
DataSourceService
}
from
'
../../service/data-source.service
'
;
import
{
RoutineResponse
}
from
'
../../../raintree/interface/routine-respons
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
CustomTableComponent
}
from
'
../../../component-library/custom-table/custom-table.component
'
;
import
{
CustomTableComponent
}
from
'
../../../component-library/custom-table/custom-table.component
'
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
...
@@ -15,6 +14,8 @@ import { MatDialogConfigService } from '../../service/mat-dialog-config.service'
...
@@ -15,6 +14,8 @@ import { MatDialogConfigService } from '../../service/mat-dialog-config.service'
import
{
RaintreeResponse
}
from
'
../../../raintree/interface/raintree-response
'
;
import
{
RaintreeResponse
}
from
'
../../../raintree/interface/raintree-response
'
;
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
DeleteRecordTransmissionService
}
from
'
../../../raintree/transmission/delete-record-transmission.service
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
ToasterService
}
from
'
../../../component-library/toaster/toaster.service
'
;
import
{
RoutineTable
}
from
'
../interface/routine-table
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
@
Component
({
@
Component
({
selector
:
'
app-routine
'
,
selector
:
'
app-routine
'
,
...
@@ -40,9 +41,9 @@ export class RoutineComponent {
...
@@ -40,9 +41,9 @@ export class RoutineComponent {
public
authService
:
AuthService
public
authService
:
AuthService
)
{
}
)
{
}
public
columns
:
any
[]
=
[];
public
columns
:
CustomTableColumn
[]
=
[];
public
data
:
any
[]
=
[];
public
data
:
RoutineTable
[]
=
[];
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
columns
=
this
.
_prepareRoutineTableData
.
prepareMatTableColumn
();
this
.
columns
=
this
.
_prepareRoutineTableData
.
prepareMatTableColumn
();
...
@@ -58,12 +59,12 @@ export class RoutineComponent {
...
@@ -58,12 +59,12 @@ export class RoutineComponent {
});
});
}
}
public
emitViewFromTable
(
emitData
:
any
)
{
public
emitViewFromTable
(
emitData
:
RoutineTable
)
{
let
docLink
=
emitData
.
schedule
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
let
docLink
=
emitData
.
schedule
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
window
.
open
(
docLink
,
'
_blank
'
);
window
.
open
(
docLink
,
'
_blank
'
);
}
}
public
emitDeleteFromTable
(
emitData
:
any
):
void
{
public
emitDeleteFromTable
(
emitData
:
RoutineTable
):
void
{
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
if
(
!
confirm
(
"
Are you sure to delete ?
"
))
return
;
this
.
_deleteTransmission
.
deleteRecord
(
this
.
_deleteTransmission
.
deleteRecord
(
...
...
src/app/portal/routine/service/prepare-routine-table-data.service.ts
View file @
9b474451
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Routine
}
from
'
../interface/routine
'
;
import
{
Routine
}
from
'
../interface/routine
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
RoutineTable
}
from
'
../interface/routine-table
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -9,26 +11,26 @@ export class PrepareRoutineTableDataService {
...
@@ -9,26 +11,26 @@ export class PrepareRoutineTableDataService {
constructor
()
{
}
constructor
()
{
}
public
prepareMatTableData
(
data
:
Routine
[]):
any
{
public
prepareMatTableData
(
data
:
Routine
[]):
RoutineTable
[]
{
let
dataArray
=
data
.
map
((
routine
:
Routine
)
=>
{
return
data
.
map
((
routine
:
Routine
)
=>
{
return
{
return
{
[
'
id
'
]
:
routine
.
id
,
id
:
routine
.
id
,
[
'
session_session_name
'
]
:
routine
.
session_session_name
?.
en
,
session_session_name
:
routine
.
session_session_name
?.
en
,
[
'
class_details
'
]
:
routine
.
class_details
?.
en
,
class_details
:
routine
.
class_details
?.
en
,
[
'
section_details
'
]
:
routine
.
section_details
?.
en
,
section_details
:
routine
.
section_details
?.
en
,
[
'
routine_type
'
]
:
routine
.
routine_type
.
en
,
routine_type
:
routine
.
routine_type
.
en
,
[
'
schedule
'
]:
routine
.
schedule
?
.
en
,
schedule
:
routine
.
schedule
.
en
,
[
'
action
'
]:
[
'
view
'
,
'
delete
'
,
]
action
:
[
'
view
'
,
'
delete
'
]
}
}
})
})
return
dataArray
;
//
return dataArray;
}
}
public
prepareMatTableColumn
():
any
[]
{
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
let
columnArray
=
[
let
columnArray
=
[
{
key
:
'
class_details
'
,
label
:
'
Class
'
},
{
key
:
'
class_details
'
,
label
:
'
Class
'
},
...
...
src/app/portal/service/url-config.service.ts
View file @
9b474451
...
@@ -5,8 +5,6 @@ import { Injectable } from '@angular/core';
...
@@ -5,8 +5,6 @@ import { Injectable } from '@angular/core';
})
})
export
class
UrlConfigService
{
export
class
UrlConfigService
{
constructor
()
{}
public
generateDatasourceConfigUrl
(
obj
:
any
):
string
{
public
generateDatasourceConfigUrl
(
obj
:
any
):
string
{
return
Object
.
entries
(
obj
)
return
Object
.
entries
(
obj
)
.
map
(([
key
,
value
])
=>
`
${
key
}
=
${
encodeURIComponent
(
value
as
string
|
number
|
boolean
)}
`
)
.
map
(([
key
,
value
])
=>
`
${
key
}
=
${
encodeURIComponent
(
value
as
string
|
number
|
boolean
)}
`
)
...
...
src/app/raintree/transmission/coa-table.service.spec.ts
deleted
100644 → 0
View file @
7518dedf
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
CoaTableService
}
from
'
./coa-table.service
'
;
describe
(
'
CoaTableService
'
,
()
=>
{
let
service
:
CoaTableService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
CoaTableService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/raintree/transmission/coa-table.service.ts
deleted
100644 → 0
View file @
7518dedf
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
RaintreeResponse
}
from
'
../interface/raintree-response
'
;
import
{
TransmissionService
}
from
'
./transmission.service
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
HttpErrorHandlerService
}
from
'
../http-error-handler.service
'
;
import
{
JWTService
}
from
'
./jwt.service
'
;
import
{
ErrorHandlerService
}
from
'
../error-handler.service
'
;
import
{
ScheduleOfRateTypes
}
from
'
../../portal/schedule-of-rates/interface/schedule-of-rate-types
'
;
import
{
ScheduleOfRateTypesResponse
}
from
'
../interface/schedule-of-rate-types-response
'
;
import
{
ScheduleOfRates
}
from
'
../../portal/schedule-of-rates/interface/schedule-of-rates
'
;
import
{
ScheduleOfRatesResponse
}
from
'
../interface/schedule-of-rates-response
'
;
@
Injectable
({
providedIn
:
'
root
'
,
})
export
class
CoaTableService
extends
TransmissionService
{
constructor
(
_http
:
HttpClient
,
_httpErrorHandler
:
HttpErrorHandlerService
,
_jwt
:
JWTService
,
_errorHandler
:
ErrorHandlerService
)
{
super
(
_http
,
_httpErrorHandler
,
_jwt
,
_errorHandler
);
}
public
getChartsOfAccount
(
url
:
string
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
any
)
=>
void
,
onSuccess
:
(
response
:
ScheduleOfRateTypes
[])
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
):
void
{
this
.
executeGetPayload
<
any
,
any
>
(
url
,
onPreExecute
,
onPostExecute
,
onSuccess
,
onFailure
,
onComplete
,
'
data
'
,
true
);
}
public
getScheduleOfRates
(
url
:
string
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
ScheduleOfRates
[])
=>
void
,
onSuccess
:
(
response
:
ScheduleOfRates
[])
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
):
void
{
this
.
executeGetPayload
<
ScheduleOfRatesResponse
,
ScheduleOfRates
[]
>
(
url
,
onPreExecute
,
onPostExecute
,
onSuccess
,
onFailure
,
onComplete
,
'
data
'
,
true
);
}
public
postScheduleOfRatesAdd
(
url
:
string
,
payload
:
ScheduleOfRates
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
RaintreeResponse
)
=>
void
,
onSuccess
:
(
response
:
RaintreeResponse
)
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
)
{
this
.
executePostPayload
(
url
,
payload
,
onPreExecute
,
onPostExecute
,
onSuccess
,
onFailure
,
onComplete
,
true
);
}
}
src/app/raintree/transmission/routine-transmission.service.ts
View file @
9b474451
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
TransmissionService
}
from
'
./transmission.service
'
;
import
{
TransmissionService
}
from
'
./transmission.service
'
;
import
{
RaintreeResponse
}
from
'
../interface/raintree-response
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -9,8 +10,8 @@ export class RoutineTransmissionService extends TransmissionService{
...
@@ -9,8 +10,8 @@ export class RoutineTransmissionService extends TransmissionService{
public
getRoutine
(
public
getRoutine
(
url
:
string
,
url
:
string
,
onPreExecute
:
()
=>
void
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
any
)
=>
void
,
onPostExecute
:
(
response
:
RaintreeResponse
)
=>
void
,
onSuccess
:
(
response
:
any
)
=>
void
,
onSuccess
:
(
response
:
RaintreeResponse
)
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
onComplete
:
()
=>
void
):
void
{
):
void
{
...
...
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