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
0752e01a
Commit
0752e01a
authored
Mar 26, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: showing Table data
parent
6a581a16
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
303 additions
and
540 deletions
+303
-540
src/app/auth/guard/verify-role.guard.ts
src/app/auth/guard/verify-role.guard.ts
+2
-2
src/app/auth/login/login.component.ts
src/app/auth/login/login.component.ts
+2
-7
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.html
...it-log/audit-log-details/audit-log-details.component.html
+0
-43
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.scss
...it-log/audit-log-details/audit-log-details.component.scss
+0
-27
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.spec.ts
...log/audit-log-details/audit-log-details.component.spec.ts
+0
-23
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.ts
...udit-log/audit-log-details/audit-log-details.component.ts
+0
-35
src/app/component-library/audit-log/audit-log/audit-log.component.html
...nent-library/audit-log/audit-log/audit-log.component.html
+0
-75
src/app/component-library/audit-log/audit-log/audit-log.component.scss
...nent-library/audit-log/audit-log/audit-log.component.scss
+0
-33
src/app/component-library/audit-log/audit-log/audit-log.component.spec.ts
...t-library/audit-log/audit-log/audit-log.component.spec.ts
+0
-23
src/app/component-library/audit-log/audit-log/audit-log.component.ts
...ponent-library/audit-log/audit-log/audit-log.component.ts
+0
-115
src/app/component-library/audit-log/interface/audit-log-config.ts
...component-library/audit-log/interface/audit-log-config.ts
+0
-6
src/app/component-library/audit-log/interface/audit-log.ts
src/app/component-library/audit-log/interface/audit-log.ts
+0
-13
src/app/component-library/audit-log/interface/response-count.ts
...p/component-library/audit-log/interface/response-count.ts
+0
-4
src/app/component-library/audit-log/model/charts-of-account-log.spec.ts
...ent-library/audit-log/model/charts-of-account-log.spec.ts
+0
-7
src/app/component-library/audit-log/model/charts-of-account-log.ts
...omponent-library/audit-log/model/charts-of-account-log.ts
+0
-42
src/app/component-library/audit-log/model/mat-modal-config.ts
...app/component-library/audit-log/model/mat-modal-config.ts
+0
-17
src/app/component-library/custom-table/custom-table.component.html
...omponent-library/custom-table/custom-table.component.html
+2
-2
src/app/mappers/transmission-mapper.service.spec.ts
src/app/mappers/transmission-mapper.service.spec.ts
+16
-0
src/app/mappers/transmission-mapper.service.ts
src/app/mappers/transmission-mapper.service.ts
+26
-20
src/app/pipe/format-date.pipe.ts
src/app/pipe/format-date.pipe.ts
+10
-10
src/app/portal/assignment/assignment/assignment.component.html
...pp/portal/assignment/assignment/assignment.component.html
+17
-6
src/app/portal/assignment/assignment/assignment.component.scss
...pp/portal/assignment/assignment/assignment.component.scss
+7
-0
src/app/portal/assignment/assignment/assignment.component.ts
src/app/portal/assignment/assignment/assignment.component.ts
+55
-17
src/app/portal/assignment/interface/assignment.ts
src/app/portal/assignment/interface/assignment.ts
+24
-0
src/app/portal/data-source/interface/data.ts
src/app/portal/data-source/interface/data.ts
+18
-0
src/app/portal/data-source/interface/foreignKeyListForDataSource.ts
...rtal/data-source/interface/foreignKeyListForDataSource.ts
+11
-0
src/app/portal/data-source/interface/foreignKeyMap.ts
src/app/portal/data-source/interface/foreignKeyMap.ts
+6
-0
src/app/portal/data-source/interface/localizedField.ts
src/app/portal/data-source/interface/localizedField.ts
+7
-0
src/app/portal/navigation/topbar/topbar.component.html
src/app/portal/navigation/topbar/topbar.component.html
+1
-1
src/app/portal/service/url-config.service.spec.ts
src/app/portal/service/url-config.service.spec.ts
+16
-0
src/app/portal/service/url-config.service.ts
src/app/portal/service/url-config.service.ts
+15
-0
src/app/raintree/interface/assignment-respons.ts
src/app/raintree/interface/assignment-respons.ts
+7
-0
src/app/raintree/interface/auth-response.ts
src/app/raintree/interface/auth-response.ts
+2
-4
src/app/raintree/interface/response-count-response.ts
src/app/raintree/interface/response-count-response.ts
+0
-7
src/app/raintree/transmission/assignment-transmission.service.spec.ts
...tree/transmission/assignment-transmission.service.spec.ts
+16
-0
src/app/raintree/transmission/assignment-transmission.service.ts
.../raintree/transmission/assignment-transmission.service.ts
+41
-0
src/app/raintree/transmission/jwt.service.ts
src/app/raintree/transmission/jwt.service.ts
+2
-1
No files found.
src/app/auth/guard/verify-role.guard.ts
View file @
0752e01a
...
@@ -13,8 +13,8 @@ export const verifyRoleGuard: CanActivateFn = (
...
@@ -13,8 +13,8 @@ export const verifyRoleGuard: CanActivateFn = (
const
requiredRoles
:
string
[]
=
route
.
data
[
'
roles
'
]
as
string
[];
const
requiredRoles
:
string
[]
=
route
.
data
[
'
roles
'
]
as
string
[];
const
userRole
:
string
=
localStorage
.
getItem
(
'
role
'
)
||
''
;
const
userRole
:
string
=
localStorage
.
getItem
(
'
role
'
)
||
''
;
console
.
log
(
'
requiredRoles=>
'
,
requiredRoles
);
//
console.log('requiredRoles=>',requiredRoles);
console
.
log
(
'
userRole=>
'
,
userRole
);
//
console.log('userRole=>',userRole);
// return true;
// return true;
if
(
userRole
&&
isRoleValid
(
requiredRoles
,
userRole
)
)
return
true
;
if
(
userRole
&&
isRoleValid
(
requiredRoles
,
userRole
)
)
return
true
;
...
...
src/app/auth/login/login.component.ts
View file @
0752e01a
import
{
CommonModule
,
NgOptimizedImage
,
isPlatformBrowser
}
from
'
@angular/common
'
;
import
{
CommonModule
,
NgOptimizedImage
,
isPlatformBrowser
}
from
'
@angular/common
'
;
import
{
Component
,
Inject
,
PLATFORM_ID
}
from
'
@angular/core
'
;
import
{
Component
,
Inject
,
PLATFORM_ID
}
from
'
@angular/core
'
;
import
{
Router
,
RouterModule
}
from
'
@angular/router
'
;
import
{
Router
,
RouterModule
}
from
'
@angular/router
'
;
import
{
RequestMapperService
}
from
'
../../mappers/request-mapper.service
'
;
import
{
RoundedButtonComponent
}
from
'
../../component-library/rounded-button/rounded-button.component
'
;
import
{
RoundedButtonFullWidthComponent
}
from
'
../../component-library/rounded-button-full-width/rounded-button-full-width.component
'
;
import
{
RoundedButtonFullWidthComponent
}
from
'
../../component-library/rounded-button-full-width/rounded-button-full-width.component
'
;
import
{
AuthTransmissionService
}
from
'
../../raintree/transmission/auth-transmission.service
'
;
import
{
AuthTransmissionService
}
from
'
../../raintree/transmission/auth-transmission.service
'
;
import
{
TransmissionMapperService
}
from
'
../../mappers/transmission-mapper.service
'
;
import
{
TransmissionMapperService
}
from
'
../../mappers/transmission-mapper.service
'
;
...
@@ -13,7 +11,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
...
@@ -13,7 +11,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
AbstractControl
,
FormControl
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
AbstractControl
,
FormControl
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
TransmissionMessageHandlerService
}
from
'
../../raintree/transmission-message-handler/transmission-message-handler
'
;
import
{
TransmissionMessageHandlerService
}
from
'
../../raintree/transmission-message-handler/transmission-message-handler
'
;
import
{
UserProfileResponse
}
from
'
../../raintree/interface/user-profile-response
'
;
import
{
UserProfile
}
from
'
../interface/user-profile
'
;
import
{
UserProfile
}
from
'
../interface/user-profile
'
;
import
{
ToasterService
}
from
'
../../component-library/toaster/toaster.service
'
;
import
{
ToasterService
}
from
'
../../component-library/toaster/toaster.service
'
;
...
@@ -22,7 +19,6 @@ import { ToasterService } from '../../component-library/toaster/toaster.service'
...
@@ -22,7 +19,6 @@ import { ToasterService } from '../../component-library/toaster/toaster.service'
imports
:
[
imports
:
[
NgOptimizedImage
,
NgOptimizedImage
,
RouterModule
,
RouterModule
,
// RoundedButtonComponent,
RoundedButtonFullWidthComponent
,
RoundedButtonFullWidthComponent
,
MatFormFieldModule
,
MatFormFieldModule
,
MatInputModule
,
MatInputModule
,
...
@@ -46,8 +42,8 @@ export class LoginComponent {
...
@@ -46,8 +42,8 @@ export class LoginComponent {
public
hidePassword
:
boolean
=
true
;
public
hidePassword
:
boolean
=
true
;
public
loginForm
=
new
FormGroup
({
public
loginForm
=
new
FormGroup
({
email
:
new
FormControl
(
''
,
[
Validators
.
required
]),
email
:
new
FormControl
(
'
achintadey.websofttechs@gmail.com
'
,
[
Validators
.
required
]),
password
:
new
FormControl
(
''
,
[
Validators
.
required
]),
password
:
new
FormControl
(
'
P@$$w0rd
'
,
[
Validators
.
required
]),
});
});
public
authenticate
():
void
{
public
authenticate
():
void
{
...
@@ -68,7 +64,6 @@ export class LoginComponent {
...
@@ -68,7 +64,6 @@ export class LoginComponent {
if
(
this
.
_transmissionMessageHandler
.
hasError
(
response
))
{
if
(
this
.
_transmissionMessageHandler
.
hasError
(
response
))
{
this
.
errorMessage
=
response
[
'
message
'
];
this
.
errorMessage
=
response
[
'
message
'
];
console
.
log
(
this
.
errorMessage
);
console
.
log
(
this
.
errorMessage
);
return
;
return
;
};
};
...
...
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.html
deleted
100644 → 0
View file @
6a581a16
<div
class=
"log_viewer_component"
>
<div
class=
"log_col full_width"
>
<app-page-heading
[title]=
"'Audit Log Details'"
/>
</div>
<div
class=
"log_col"
>
<h3>
ID
</h3>
<p>
{{data.id}}
</p>
</div>
<div
class=
"log_col"
>
<h3>
User Id
</h3>
<p>
{{data.user_id}}
</p>
</div>
<div
class=
"log_col"
>
<h3>
User Name
</h3>
<p>
{{data.user_name}}
</p>
</div>
<div
class=
"log_col"
>
<h3>
Created At
</h3>
<p>
{{data.created_at}}
</p>
</div>
<div
class=
"log_col"
>
<h3>
IP Address
</h3>
<p>
{{data.ip_address}}
</p>
</div>
<div
class=
"log_col full_width"
>
<h3>
endpoint
</h3>
<p>
{{temp(data.request_payload)}}
</p>
</div>
<div
class=
"log_col full_width"
>
<h3>
Notes
</h3>
<p>
{{temp(data.request_payload) }}
</p>
</div>
</div>
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.scss
deleted
100644 → 0
View file @
6a581a16
.log_viewer_component
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
20px
;
background-color
:
var
(
--
primary-bg-color
);
color
:
var
(
--
primary-color
);
.log_col
{
width
:
20%
;
h3
{
font-size
:
14px
;
}
&
.full_width
{
width
:
100%
;
}
}
}
.
mat-mdc-dialog-surface
:
:
ng-deep
{
background
:
var
(
--
secondary-bg-color
)
!
important
;
}
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.spec.ts
deleted
100644 → 0
View file @
6a581a16
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
AuditLogDetailsComponent
}
from
'
./audit-log-details.component
'
;
describe
(
'
AuditLogDetailsComponent
'
,
()
=>
{
let
component
:
AuditLogDetailsComponent
;
let
fixture
:
ComponentFixture
<
AuditLogDetailsComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
imports
:
[
AuditLogDetailsComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
AuditLogDetailsComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/component-library/audit-log/audit-log-details/audit-log-details.component.ts
deleted
100644 → 0
View file @
6a581a16
import
{
Component
,
Inject
}
from
'
@angular/core
'
;
import
{
MatDialogRef
,
MAT_DIALOG_DATA
,
MatDialogActions
,
MatDialogClose
,
MatDialogContent
,
MatDialogTitle
}
from
'
@angular/material/dialog
'
;
import
{
AuditLog
}
from
'
../interface/audit-log
'
;
import
{
PageHeadingComponent
}
from
'
../../page-heading/page-heading.component
'
;
@
Component
({
selector
:
'
app-audit-log-details
'
,
imports
:
[
// MatDialogTitle,
// MatDialogContent,
// MatDialogActions,
// MatDialogClose,
PageHeadingComponent
],
templateUrl
:
'
./audit-log-details.component.html
'
,
styleUrl
:
'
./audit-log-details.component.scss
'
})
export
class
AuditLogDetailsComponent
{
constructor
(
private
_dialogRef
:
MatDialogRef
<
AuditLogDetailsComponent
>
,
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
AuditLog
,
)
{}
public
onNoClick
():
void
{
this
.
_dialogRef
.
close
(
this
.
data
);
}
public
ngOnInit
():
void
{
console
.
log
(
this
.
data
)
}
public
temp
(
request_payload
:
any
):
any
{
return
JSON
.
stringify
(
request_payload
,
null
,
2
);
}
}
src/app/component-library/audit-log/audit-log/audit-log.component.html
deleted
100644 → 0
View file @
6a581a16
<app-page-heading
[title]=
"'Audit Log'"
/>
<app-filter-with-export-and-print
[placeholder]=
"'Ex: User ID, User Name'"
(inputData)=
"applyFilter($event)"
[dropDownData]=
"endPoints"
(emitDropDownData)=
"selectDropdownFromFilter($event)"
></app-filter-with-export-and-print>
<table
mat-table
[dataSource]=
"dataSource"
>
<!-- ID Column -->
<ng-container
matColumnDef=
"id"
>
<th
mat-header-cell
*matHeaderCellDef
>
ID
</th>
<td
mat-cell
*matCellDef=
"let log"
data-label=
"id"
>
{{ log.id }}
</td>
</ng-container>
<!-- User ID Column -->
<ng-container
matColumnDef=
"user_id"
>
<th
mat-header-cell
*matHeaderCellDef
>
User ID
</th>
<td
mat-cell
*matCellDef=
"let log"
>
{{ log.user_id }}
</td>
</ng-container>
<!-- User Name Column -->
<ng-container
matColumnDef=
"user_name"
>
<th
mat-header-cell
*matHeaderCellDef
>
User Name
</th>
<td
mat-cell
*matCellDef=
"let log"
>
{{ log.user_name }}
</td>
</ng-container>
<!-- IP Address Column -->
<ng-container
matColumnDef=
"ip_address"
>
<th
mat-header-cell
*matHeaderCellDef
>
IP Address
</th>
<td
mat-cell
*matCellDef=
"let log"
>
{{ log.ip_address }}
</td>
</ng-container>
<!-- Method Column -->
<ng-container
matColumnDef=
"method"
>
<th
mat-header-cell
*matHeaderCellDef
>
Method
</th>
<td
mat-cell
*matCellDef=
"let log"
>
{{ log.method }}
</td>
</ng-container>
<!-- Created Column -->
<ng-container
matColumnDef=
"created_at"
>
<th
mat-header-cell
*matHeaderCellDef
>
Created
</th>
<td
mat-cell
*matCellDef=
"let log"
>
{{ log.created_at }}
</td>
</ng-container>
<!-- CTA Column -->
<ng-container
matColumnDef=
"action"
>
<th
mat-header-cell
*matHeaderCellDef
>
Action
</th>
<td
mat-cell
*matCellDef=
"let log"
>
<button
(click)=
"openDialog(log)"
class=
"view_button"
>
<span
class=
"material-symbols-outlined"
>
visibility
</span>
</button>
</td>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef=
"displayedColumns"
></tr>
<tr
mat-row
*matRowDef=
"let row; columns: displayedColumns"
></tr>
</table>
<mat-paginator
[length]=
"totalItems"
[pageSize]=
"pageSize"
showFirstLastButtons
[pageSizeOptions]=
"[5, 10, 20]"
(page)=
"pageChanged($event)"
*ngIf=
"dataSource && dataSource.data.length"
#paginator
></mat-paginator>
src/app/component-library/audit-log/audit-log/audit-log.component.scss
deleted
100644 → 0
View file @
6a581a16
// .mat-mdc-table::ng-deep {
// background: var(--secondary-bg-color);
// box-shadow: var(--box-shadow-small);
// font-family: var(--font-light);
// .mat-mdc-header-row {
// background: var(--accent-color);
// border: none;
// color: white;
// }
// .mdc-data-table__content{
// td {
// color: var(--primary-color);
// border-bottom: 1px solid var(--border-color);
// }
// .mdc-data-table__row:last-child .mat-mdc-cell {
// border-bottom: none;
// }
// }
// }
// .view_button {
// all: unset;
// display: block;
// text-align: center;
// width: 100%;
// cursor: pointer;
// }
src/app/component-library/audit-log/audit-log/audit-log.component.spec.ts
deleted
100644 → 0
View file @
6a581a16
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
AuditLogComponent
}
from
'
./audit-log.component
'
;
describe
(
'
AuditLogComponent
'
,
()
=>
{
let
component
:
AuditLogComponent
;
let
fixture
:
ComponentFixture
<
AuditLogComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
imports
:
[
AuditLogComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
AuditLogComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/component-library/audit-log/audit-log/audit-log.component.ts
deleted
100644 → 0
View file @
6a581a16
import
{
AfterViewInit
,
Component
,
Input
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
MatTableDataSource
,
MatTableModule
}
from
'
@angular/material/table
'
;
import
{
AuditLog
}
from
'
../interface/audit-log
'
;
import
{
MatDialog
,
MatDialogModule
}
from
'
@angular/material/dialog
'
;
import
{
AuditLogDetailsComponent
}
from
'
../audit-log-details/audit-log-details.component
'
;
import
{
MatPaginator
,
MatPaginatorModule
,
PageEvent
}
from
'
@angular/material/paginator
'
;
import
{
PipeModule
}
from
'
../../../pipe/pipe.module
'
;
import
{
FilterWithExportAndPrintComponent
}
from
'
../../filter-with-export-and-print/filter-with-export-and-print.component
'
;
import
{
PageHeadingComponent
}
from
'
../../page-heading/page-heading.component
'
;
import
{
MatModalConfig
}
from
'
../model/mat-modal-config
'
;
import
{
AuditLogTransmissionService
}
from
'
../../../raintree/transmission/audit-log-transmission.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
Dropdown
}
from
'
../../dropdown/interface/dropdown
'
;
import
{
PaginationComponent
}
from
'
../../pagination/pagination/pagination.component
'
;
@
Component
({
selector
:
'
app-audit-log
'
,
imports
:
[
MatTableModule
,
PageHeadingComponent
,
PipeModule
,
MatDialogModule
,
MatPaginatorModule
,
FilterWithExportAndPrintComponent
,
CommonModule
,
// PaginationComponent
],
templateUrl
:
'
./audit-log.component.html
'
,
styleUrls
:
[
'
../../../style-guide/css/table-theme.scss
'
]
})
export
class
AuditLogComponent
implements
AfterViewInit
,
OnInit
{
@
ViewChild
(
MatPaginator
)
private
paginator
!
:
MatPaginator
;
@
Input
()
public
logs
:
AuditLog
[]
=
[];
@
Input
()
public
endPoints
:
Dropdown
[]
=
[];
public
displayedColumns
:
string
[]
=
[
'
id
'
,
'
user_id
'
,
'
user_name
'
,
'
ip_address
'
,
'
method
'
,
'
created_at
'
,
'
action
'
];
public
dataSource
:
MatTableDataSource
<
AuditLog
>
=
{}
as
MatTableDataSource
<
AuditLog
>
;
public
pageSize
:
number
=
5
;
public
pageNumber
:
number
=
1
;
public
totalItems
=
0
;
constructor
(
private
_dialog
:
MatDialog
,
private
_auditLogTransmission
:
AuditLogTransmissionService
)
{
this
.
dataSource
=
new
MatTableDataSource
(
this
.
logs
);
}
public
openDialog
(
log
:
AuditLog
):
void
{
this
.
_dialog
.
open
(
AuditLogDetailsComponent
,
{
data
:
log
,
...
MatModalConfig
.
getLogConfig
});
}
public
ngOnInit
():
void
{
this
.
_getLogCount
(
this
.
endPoints
[
0
].
value
,
this
.
pageNumber
,
this
.
pageSize
);
}
public
ngAfterViewInit
():
void
{
this
.
dataSource
.
paginator
=
this
.
paginator
;
}
public
applyFilter
(
filterString
:
string
):
void
{
this
.
dataSource
.
filter
=
filterString
.
trim
().
toLowerCase
();
if
(
this
.
dataSource
.
paginator
)
{
this
.
dataSource
.
paginator
.
firstPage
();
}
}
private
_getLogs
(
endPoint
:
string
,
pageNumber
:
number
,
pageSize
:
number
):
void
{
this
.
_auditLogTransmission
.
getLogs
(
TransmissionMapperService
.
AUDIT_LOG_TRANSMISSION_URL
+
`?endpoint=
${
endPoint
}
&page=
${
pageNumber
?
pageNumber
:
1
}
&page_size=
${
pageSize
}
`
,
()
=>
{},
()
=>
{},
(
response
)
=>
{
//success
this
.
logs
=
response
;
this
.
dataSource
=
new
MatTableDataSource
(
this
.
logs
);
},
()
=>
{},
//failure
()
=>
{},
);
}
private
_getLogCount
(
endPoint
:
string
,
pageNumber
:
number
,
pageSize
:
number
):
void
{
this
.
_auditLogTransmission
.
getLogCount
(
TransmissionMapperService
.
AUDIT_LOG_COUNT_TRANSMISSION_URL
+
`?endpoint=
${
endPoint
}
&page=
${
pageNumber
?
pageNumber
:
1
}
&page_size=
${
pageSize
}
`
,
()
=>
{},
()
=>
{},
(
response
)
=>
{
//success
this
.
totalItems
=
response
.
count
;
this
.
_getLogs
(
endPoint
,
pageNumber
,
pageSize
);
},
()
=>
{},
//failure
()
=>
{},
);
}
public
selectDropdownFromFilter
(
selectedData
:
string
):
void
{
let
endpoint
:
string
=
encodeURIComponent
(
selectedData
);
// this.paginator.firstPage();
this
.
_getLogCount
(
endpoint
,
1
,
this
.
pageSize
);
}
public
pageChanged
(
event
:
PageEvent
)
:
void
{
this
.
pageSize
=
event
.
pageSize
;
this
.
pageNumber
=
event
.
pageIndex
+
1
;
this
.
_getLogCount
(
this
.
endPoints
[
0
].
value
,
this
.
pageNumber
,
this
.
pageSize
);
}
}
src/app/component-library/audit-log/interface/audit-log-config.ts
deleted
100644 → 0
View file @
6a581a16
export
interface
AuditLogConfig
{
width
:
string
,
height
:
string
,
maxWidth
:
string
,
maxHeight
:
string
,
}
src/app/component-library/audit-log/interface/audit-log.ts
deleted
100644 → 0
View file @
6a581a16
export
interface
AuditLog
{
id
:
number
,
user_id
:
number
,
user_name
:
string
,
ip_address
:
string
,
endpoint
:
string
,
method
:
string
,
request_payload
:
any
,
query_params
:
any
,
created_at
:
string
}
src/app/component-library/audit-log/interface/response-count.ts
deleted
100644 → 0
View file @
6a581a16
export
interface
ResponseCount
{
count
:
number
}
src/app/component-library/audit-log/model/charts-of-account-log.spec.ts
deleted
100644 → 0
View file @
6a581a16
import
{
ChartsOfAccountLog
}
from
'
./charts-of-account-log
'
;
describe
(
'
ChartsOfAccountLog
'
,
()
=>
{
it
(
'
should create an instance
'
,
()
=>
{
expect
(
new
ChartsOfAccountLog
()).
toBeTruthy
();
});
});
src/app/component-library/audit-log/model/charts-of-account-log.ts
deleted
100644 → 0
View file @
6a581a16
import
{
AuditLog
}
from
"
../interface/audit-log
"
;
export
class
ChartsOfAccountLog
{
private
static
readonly
_log1
:
AuditLog
=
{
id
:
1
,
user_id
:
123
,
user_name
:
'
Deep Dey
'
,
ip_address
:
'
103.220.209.138
'
,
endpoint
:
'
/nkda/v1/user/get
'
,
method
:
'
POST
'
,
request_payload
:
{
key1
:
'
value1
'
,
key2
:
'
value2
'
,
key3
:
'
value3
'
,
key4
:
'
value4
'
,
},
query_params
:
{
key1
:
'
value1
'
,
key2
:
'
value2
'
,
key3
:
'
value3
'
,
key4
:
'
value4
'
,
},
created_at
:
'
20-5-2024
'
}
private
static
readonly
_logItems
:
AuditLog
[]
=
[
ChartsOfAccountLog
.
_log1
,
ChartsOfAccountLog
.
_log1
,
ChartsOfAccountLog
.
_log1
,
ChartsOfAccountLog
.
_log1
,
ChartsOfAccountLog
.
_log1
,
ChartsOfAccountLog
.
_log1
,
];
public
static
get
getLogItems
():
AuditLog
[]
{
return
ChartsOfAccountLog
.
_logItems
;
}
}
src/app/component-library/audit-log/model/mat-modal-config.ts
deleted
100644 → 0
View file @
6a581a16
import
{
AuditLogConfig
}
from
"
../interface/audit-log-config
"
;
export
class
MatModalConfig
{
private
static
readonly
_config
:
AuditLogConfig
=
{
width
:
'
98vw
'
,
height
:
'
auto
'
,
maxWidth
:
'
70vw
'
,
maxHeight
:
'
70vh
'
,
}
public
static
get
getLogConfig
():
AuditLogConfig
{
return
MatModalConfig
.
_config
;
}
}
src/app/component-library/custom-table/custom-table.component.html
View file @
0752e01a
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
@for (item of element[column.key]; track item) {
@for (item of element[column.key]; track item) {
<ng-container
*ngIf=
"item =='view'"
>
<ng-container
*ngIf=
"item =='view'"
>
<button
class=
"view_button d_inline_block width_auto
ml_1
"
(click)=
"view(element)"
>
<button
class=
"view_button d_inline_block width_auto "
(click)=
"view(element)"
>
<span
class=
"material-symbols-outlined"
>
visibility
</span>
<span
class=
"material-symbols-outlined"
>
visibility
</span>
</button>
</button>
</ng-container>
</ng-container>
<ng-container
*ngIf=
"item =='edit'"
>
<ng-container
*ngIf=
"item =='edit'"
>
<button
class=
"view_button d_inline_block width_auto
ml_1
"
(click)=
"edit(element)"
>
<button
class=
"view_button d_inline_block width_auto "
(click)=
"edit(element)"
>
<span
class=
"material-symbols-outlined"
>
edit
</span>
<span
class=
"material-symbols-outlined"
>
edit
</span>
</button>
</button>
</ng-container>
</ng-container>
...
...
src/app/mappers/transmission-mapper.service.spec.ts
0 → 100644
View file @
0752e01a
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
TransmissionMapperService
}
from
'
./transmission-mapper.service
'
;
describe
(
'
TransmissionMapperService
'
,
()
=>
{
let
service
:
TransmissionMapperService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
TransmissionMapperService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/mappers/transmission-mapper.service.ts
View file @
0752e01a
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
,
providedIn
:
'
root
'
})
})
export
class
TransmissionMapperService
{
export
class
TransmissionMapperService
{
constructor
()
{
}
constructor
()
{
}
public
static
readonly
DEV_TRANSMISSION_URL
:
string
=
public
static
readonly
DEV_TRANSMISSION_URL
:
string
=
'
https://magicoweb.com
'
;
'
https://magicoweb.com
'
;
...
@@ -14,24 +16,28 @@ export class TransmissionMapperService {
...
@@ -14,24 +16,28 @@ export class TransmissionMapperService {
public
static
readonly
USER_PROFILE_TRANSMISSION_URL
:
string
=
public
static
readonly
USER_PROFILE_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/user/get-profile
'
;
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/user/get-profile
'
;
public
static
readonly
SCHEDULE_OF_RATES_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/schedule-of-rates/get-all
'
;
public
static
readonly
SCHEDULE_OF_RATES_ADD_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/schedule-of-rates/add
'
;
public
static
readonly
SCHEDULE_OF_RATES_UPDATE_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/schedule-of-rates/update
'
;
public
static
readonly
SCHEDULE_OF_RATE_TYPE_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/schedule-of-rate-type/get-all
'
;
public
static
readonly
AUDIT_LOG_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/entry-log/get
'
;
public
static
readonly
AUDIT_LOG_COUNT_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/entry-log/count
'
;
public
static
readonly
CHARTS_OF_ACCOUNT_TRANSMISION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/chart-of-account/get-all?head_type=income&get_only_head=false&get_nested_preview=true&page=1&page_size=100
'
;
public
static
readonly
ASSIGNMENT_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/webomagic/getWebDataSourceByWebsiteDataSourceForFilter?
'
;
// aggregationOnUniqueFld=false&datasourceId=3188&dontIncludeForeignKey=false&expand=false&isUniqueValueRequiredForFieldToDisplay=false&language=en&limit=10&orderBy=ASC&page=1&user_id=206&roleBasedFiltering=true
// public static readonly SCHEDULE_OF_RATES_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL +
// '/schedule-of-rates/get-all';
// public static readonly SCHEDULE_OF_RATES_ADD_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL + '/schedule-of-rates/add';
// public static readonly SCHEDULE_OF_RATES_UPDATE_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL +
// '/schedule-of-rates/update';
// public static readonly SCHEDULE_OF_RATE_TYPE_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL +
// '/schedule-of-rate-type/get-all';
// public static readonly AUDIT_LOG_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL + '/entry-log/get';
// public static readonly AUDIT_LOG_COUNT_TRANSMISSION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL + '/entry-log/count';
// public static readonly CHARTS_OF_ACCOUNT_TRANSMISION_URL: string =
// TransmissionMapperService.DEV_TRANSMISSION_URL +
// '/chart-of-account/get-all?head_type=income&get_only_head=false&get_nested_preview=true&page=1&page_size=100';
}
}
src/app/pipe/format-date.pipe.ts
View file @
0752e01a
import
{
Pipe
,
PipeTransform
}
from
"
@angular/core
"
;
import
{
Pipe
,
PipeTransform
}
from
"
@angular/core
"
;
@
Pipe
({
@
Pipe
({
name
:
'
formatDate
'
,
name
:
'
formatDate
'
,
standalone
:
false
standalone
:
false
})
})
export
class
FormatDatePipe
implements
PipeTransform
{
export
class
FormatDatePipe
implements
PipeTransform
{
transform
(
timestamp
:
number
):
string
{
transform
(
timestamp
:
number
):
string
{
const
date
=
new
Date
(
timestamp
);
const
date
=
new
Date
(
timestamp
);
const
day
=
date
.
getDate
();
const
day
=
date
.
getDate
();
const
month
=
this
.
getMonthName
(
date
.
getMonth
());
const
month
=
this
.
getMonthName
(
date
.
getMonth
());
const
year
=
date
.
getFullYear
();
const
year
=
date
.
getFullYear
();
const
ordinalSuffix
=
this
.
getOrdinalSuffix
(
day
);
const
ordinalSuffix
=
this
.
getOrdinalSuffix
(
day
);
return
`
${
day
}${
ordinalSuffix
}
${
month
}
,
${
year
}
`
;
return
`
${
day
}${
ordinalSuffix
}
${
month
}
,
${
year
}
`
;
}
}
private
getMonthName
(
month
:
number
):
string
{
private
getMonthName
(
month
:
number
):
string
{
const
months
=
[
const
months
=
[
'
Jan
'
,
'
Feb
'
,
'
Mar
'
,
'
Apr
'
,
'
May
'
,
'
Jun
'
,
'
Jul
'
,
'
Aug
'
,
'
Sep
'
,
'
Oct
'
,
'
Nov
'
,
'
Dec
'
'
Jan
'
,
'
Feb
'
,
'
Mar
'
,
'
Apr
'
,
'
May
'
,
'
Jun
'
,
'
Jul
'
,
'
Aug
'
,
'
Sep
'
,
'
Oct
'
,
'
Nov
'
,
'
Dec
'
];
];
return
months
[
month
];
return
months
[
month
];
}
}
private
getOrdinalSuffix
(
day
:
number
):
string
{
private
getOrdinalSuffix
(
day
:
number
):
string
{
const
suffixes
=
[
'
th
'
,
'
st
'
,
'
nd
'
,
'
rd
'
];
const
suffixes
=
[
'
th
'
,
'
st
'
,
'
nd
'
,
'
rd
'
];
const
teenDigits
=
[
11
,
12
,
13
];
const
teenDigits
=
[
11
,
12
,
13
];
const
lastDigit
=
day
%
10
;
const
lastDigit
=
day
%
10
;
if
(
teenDigits
.
includes
(
day
))
{
if
(
teenDigits
.
includes
(
day
))
{
return
suffixes
[
0
];
return
suffixes
[
0
];
}
}
return
suffixes
[
lastDigit
]
||
suffixes
[
0
];
return
suffixes
[
lastDigit
]
||
suffixes
[
0
];
}
}
}
}
src/app/portal/assignment/assignment/assignment.component.html
View file @
0752e01a
<app-custom-table
<div
class=
"custom_table"
>
<app-custom-table
[columns]=
"columns"
[columns]=
"columns"
[data]=
"data"
[data]=
"data"
(emitEdit)=
"emitEditFromTable($event)"
(emitEdit)=
"emitEditFromTable($event)"
(emitView)=
"emitViewFromTable($event)"
(emitView)=
"emitViewFromTable($event)"
/>
/>
</div>
<div
class=
"add_btn"
>
<app-square-button
[buttonIcon]=
"'add'"
(emitSquareButtonClick)=
"addAssignment()"
/>
</div>
src/app/portal/assignment/assignment/assignment.component.scss
View file @
0752e01a
.add_btn
{
position
:
fixed
;
bottom
:
20px
;
right
:
0
;
padding
:
0px
20px
;
margin
:
auto
;
}
\ No newline at end of file
src/app/portal/assignment/assignment/assignment.component.ts
View file @
0752e01a
...
@@ -2,12 +2,19 @@ import { Component } from '@angular/core';
...
@@ -2,12 +2,19 @@ import { Component } from '@angular/core';
import
{
CustomTableComponent
}
from
'
../../../component-library/custom-table/custom-table.component
'
;
import
{
CustomTableComponent
}
from
'
../../../component-library/custom-table/custom-table.component
'
;
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
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
{
AssignmentTransmissionService
}
from
'
../../../raintree/transmission/assignment-transmission.service
'
;
import
{
AssignmentsResponse
}
from
'
../../../raintree/interface/assignment-respons
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
Assignment
}
from
'
../interface/assignment
'
;
@
Component
({
@
Component
({
selector
:
'
app-assignment
'
,
selector
:
'
app-assignment
'
,
imports
:
[
imports
:
[
CustomTableComponent
CustomTableComponent
,
],
SquareButtonComponent
],
templateUrl
:
'
./assignment.component.html
'
,
templateUrl
:
'
./assignment.component.html
'
,
styleUrl
:
'
./assignment.component.scss
'
styleUrl
:
'
./assignment.component.scss
'
})
})
...
@@ -15,28 +22,54 @@ import { ManageComponent } from '../manage/manage.component';
...
@@ -15,28 +22,54 @@ import { ManageComponent } from '../manage/manage.component';
export
class
AssignmentComponent
{
export
class
AssignmentComponent
{
constructor
(
constructor
(
private
_dialog
:
MatDialog
,
private
_dialog
:
MatDialog
,
private
_assignmentTransmissionService
:
AssignmentTransmissionService
,
private
_urlConfigService
:
UrlConfigService
){}
){}
public
columns
=
[
public
columns
=
[
{
key
:
'
class
'
,
label
:
'
Class
'
},
{
key
:
'
class
_subject_subject_txt
'
,
label
:
'
Class
'
},
{
key
:
'
subject
'
,
label
:
'
Subject
'
},
{
key
:
'
subject
'
,
label
:
'
Subject
'
},
{
key
:
'
section
'
,
label
:
'
Section
'
},
{
key
:
'
section
'
,
label
:
'
Section
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
];
];
public
data
=
[
public
data
:
Assignment
[]
=
[];
{
class
:
"
VI
"
,
ngOnInit
():
void
{
subject
:
"
Math
"
,
section
:
"
5A
"
,
this
.
_getAssignment
();
action
:
[
'
view
'
,
'
edit
'
]
}
private
_getAssignment
()
:
void
{
this
.
_assignmentTransmissionService
.
getAssignment
(
TransmissionMapperService
.
ASSIGNMENT_TRANSMISSION_URL
+
this
.
_urlConfigService
.
generateDatasourceConfigUrl
({
aggregationOnUniqueFld
:
false
,
datasourceId
:
3188
,
dontIncludeForeignKey
:
false
,
expand
:
false
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
language
:
"
en
"
,
limit
:
10
,
orderBy
:
"
ASC
"
,
page
:
1
,
roleBasedFiltering
:
true
}),
()
=>
{
},
(
response
)
=>
{
},
(
response
:
AssignmentsResponse
)
=>
{
this
.
data
=
response
.
data
.
themeDataSourceFields
// response['data']['themeDataSourceFields'].map((assignment:Assignment) => {
// return{
// assignment.
// }
// })
console
.
log
(
this
.
data
);
},
},
{
(
error
)
=>
{
class
:
"
VI
"
,
console
.
log
(
error
);
subject
:
"
Math
"
,
},
()
=>
{
}
section
:
"
5B
"
,
)
action
:
[
'
view
'
,
'
edit
'
]
}
}
];
public
emitViewFromTable
(
clickedData
:
string
){
public
emitViewFromTable
(
clickedData
:
string
){
alert
(
"
Have to view the doc in another page
"
);
alert
(
"
Have to view the doc in another page
"
);
...
@@ -62,4 +95,9 @@ export class AssignmentComponent {
...
@@ -62,4 +95,9 @@ export class AssignmentComponent {
// });
// });
}
}
public
addAssignment
(){
alert
(
"
Add assignment
"
);
}
}
}
src/app/portal/assignment/interface/assignment.ts
0 → 100644
View file @
0752e01a
import
{
Data
}
from
"
../../data-source/interface/data
"
;
import
{
LocalizedField
}
from
"
../../data-source/interface/localizedField
"
;
// ThemeDataSourceField Interface
export
interface
Assignments
extends
Data
{
themeDataSourceFields
:
Assignment
[];
}
// ThemeDataSourceField Interface
export
interface
Assignment
{
session
:
LocalizedField
;
subject
:
LocalizedField
;
assigned_on
:
LocalizedField
;
last_submission_date
:
LocalizedField
;
section
:
LocalizedField
;
docs
:
LocalizedField
;
class_subject
:
LocalizedField
;
session_session_name
:
LocalizedField
;
section_details
:
LocalizedField
;
id
:
string
;
subject_subject_name
:
LocalizedField
;
class_subject_subject_txt
:
LocalizedField
;
}
src/app/portal/data-source/interface/data.ts
0 → 100644
View file @
0752e01a
import
{
ForeignKeyMap
}
from
"
./foreignKeyMap
"
;
// Data Interface
export
interface
Data
{
count
:
number
;
id
:
number
;
dataSourceName
:
string
;
websiteId
:
number
;
type
:
string
;
foreignKeyMapping
:
any
;
foreignKeyMap
:
ForeignKeyMap
;
requiredPresentationField
:
string
;
favourite
:
boolean
;
icon
:
string
;
dependentFields
:
any
;
dsType
:
any
;
[
index
:
string
]:
any
;
}
\ No newline at end of file
src/app/portal/data-source/interface/foreignKeyListForDataSource.ts
0 → 100644
View file @
0752e01a
// ForeignKeyListForDataSource Interface
export
interface
ForeignKeyListForDataSource
{
fieldName
:
string
;
foreignTableId
:
number
;
presentationFieldPattern
:
any
;
presenterField
:
any
;
isMultiSelect
:
boolean
;
foreignUniqueField
:
any
;
id
:
any
;
remotePresenterField
:
string
;
}
\ No newline at end of file
src/app/portal/data-source/interface/foreignKeyMap.ts
0 → 100644
View file @
0752e01a
import
{
ForeignKeyListForDataSource
}
from
"
./foreignKeyListForDataSource
"
;
export
interface
ForeignKeyMap
{
dataSourceId
:
number
;
foreignKeyListForDataSource
:
ForeignKeyListForDataSource
[];
}
\ No newline at end of file
src/app/portal/data-source/interface/localizedField.ts
0 → 100644
View file @
0752e01a
// LocalizedField Interface (replaces repeated language-specific fields)
export
interface
LocalizedField
{
default
:
string
;
beng
:
string
;
hindi
:
string
;
en
:
string
;
}
\ No newline at end of file
src/app/portal/navigation/topbar/topbar.component.html
View file @
0752e01a
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
{{userProfileInformation.name}}
{{userProfileInformation.name}}
<span
class=
"material-symbols-outlined"
>
keyboard_arrow_down
</span>
<span
class=
"material-symbols-outlined"
>
keyboard_arrow_down
</span>
</p>
</p>
<p
class=
"user_role"
>
{{userProfileInformation.
user_typ
e}}
</p>
<p
class=
"user_role"
>
{{userProfileInformation.
role_nam
e}}
</p>
</div>
</div>
</div>
</div>
...
...
src/app/portal/service/url-config.service.spec.ts
0 → 100644
View file @
0752e01a
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
UrlConfigService
}
from
'
./url-config.service
'
;
describe
(
'
UrlConfigService
'
,
()
=>
{
let
service
:
UrlConfigService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
UrlConfigService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/portal/service/url-config.service.ts
0 → 100644
View file @
0752e01a
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
UrlConfigService
{
constructor
()
{
}
public
generateDatasourceConfigUrl
(
obj
:
any
):
string
{
return
Object
.
entries
(
obj
)
.
map
(([
key
,
value
])
=>
`
${
key
}
=
${
encodeURIComponent
(
value
as
string
|
number
|
boolean
)}
`
)
.
join
(
'
&
'
);
}
}
src/app/raintree/interface/assignment-respons.ts
0 → 100644
View file @
0752e01a
import
{
Assignments
}
from
"
../../portal/assignment/interface/assignment
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
export
interface
AssignmentsResponse
extends
RaintreeResponse
{
data
:
Assignments
;
}
\ No newline at end of file
src/app/raintree/interface/auth-response.ts
View file @
0752e01a
import
{
Jwt
}
from
"
./jwt
"
;
import
{
UserProfile
}
from
"
../../auth/interface/user-profile
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
export
interface
AUthResponse
extends
RaintreeResponse
{
export
interface
AUthResponse
extends
RaintreeResponse
{
data
:
Jwt
;
data
:
UserProfile
;
}
}
src/app/raintree/interface/response-count-response.ts
deleted
100644 → 0
View file @
6a581a16
import
{
ResponseCount
}
from
"
../../component-library/audit-log/interface/response-count
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
export
interface
ResponseCountResponse
extends
RaintreeResponse
{
data
:
ResponseCount
;
}
src/app/raintree/transmission/assignment-transmission.service.spec.ts
0 → 100644
View file @
0752e01a
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
AssignmentTransmissionService
}
from
'
./assignment-transmission.service
'
;
describe
(
'
AssignmentTransmissionService
'
,
()
=>
{
let
service
:
AssignmentTransmissionService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
AssignmentTransmissionService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/raintree/transmission/assignment-transmission.service.ts
0 → 100644
View file @
0752e01a
import
{
Injectable
}
from
'
@angular/core
'
;
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
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
AssignmentTransmissionService
extends
TransmissionService
{
// constructor(
// _http: HttpClient,
// _httpErrorHandler: HttpErrorHandlerService,
// _jwt: JWTService,
// _errorHandler: ErrorHandlerService
// ) {
// super(_http, _httpErrorHandler, _jwt, _errorHandler);
// }
public
getAssignment
(
url
:
string
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
any
)
=>
void
,
onSuccess
:
(
response
:
any
)
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
):
void
{
this
.
executePostPayload
<
any
>
(
url
,
{},
onPreExecute
,
onPostExecute
,
onSuccess
,
onFailure
,
onComplete
,
true
);
}
}
src/app/raintree/transmission/jwt.service.ts
View file @
0752e01a
...
@@ -17,7 +17,8 @@ export class JWTService {
...
@@ -17,7 +17,8 @@ export class JWTService {
// TODO: check if token exist in Local storage and handle accordingly
// TODO: check if token exist in Local storage and handle accordingly
return
new
HttpHeaders
({
return
new
HttpHeaders
({
Authorization
:
`Bearer
${
authorizationToken
}
`
,
"
user-id
"
:
'
206
'
,
"
apikey
"
:
authorizationToken
,
'
Content-Type
'
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
});
});
}
}
...
...
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