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
e6d09e58
Commit
e6d09e58
authored
Mar 28, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: exam-schedule
parent
b97b9938
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
253 additions
and
19 deletions
+253
-19
src/app/portal/data-source/interface/class.ts
src/app/portal/data-source/interface/class.ts
+3
-3
src/app/portal/data-source/interface/section.ts
src/app/portal/data-source/interface/section.ts
+2
-2
src/app/portal/exam/exam/exam.component.html
src/app/portal/exam/exam/exam.component.html
+15
-1
src/app/portal/exam/exam/exam.component.scss
src/app/portal/exam/exam/exam.component.scss
+7
-0
src/app/portal/exam/exam/exam.component.ts
src/app/portal/exam/exam/exam.component.ts
+84
-1
src/app/portal/exam/interface/exam-schedule.ts
src/app/portal/exam/interface/exam-schedule.ts
+20
-0
src/app/portal/exam/manage/manage.component.html
src/app/portal/exam/manage/manage.component.html
+1
-1
src/app/portal/exam/manage/manage.component.ts
src/app/portal/exam/manage/manage.component.ts
+10
-2
src/app/portal/exam/service/prepare-exam-table-data.service.spec.ts
...rtal/exam/service/prepare-exam-table-data.service.spec.ts
+16
-0
src/app/portal/exam/service/prepare-exam-table-data.service.ts
...pp/portal/exam/service/prepare-exam-table-data.service.ts
+40
-0
src/app/portal/routine/manage/manage.component.ts
src/app/portal/routine/manage/manage.component.ts
+2
-2
src/app/portal/routine/routine/routine.component.ts
src/app/portal/routine/routine/routine.component.ts
+0
-4
src/app/portal/service/data-source.service.ts
src/app/portal/service/data-source.service.ts
+1
-0
src/app/raintree/interface/class-respons.ts
src/app/raintree/interface/class-respons.ts
+1
-1
src/app/raintree/interface/exam-schedule-respons.ts
src/app/raintree/interface/exam-schedule-respons.ts
+6
-0
src/app/raintree/interface/section-respons.ts
src/app/raintree/interface/section-respons.ts
+1
-1
src/app/raintree/transmission/exam-schedule.service.spec.ts
src/app/raintree/transmission/exam-schedule.service.spec.ts
+16
-0
src/app/raintree/transmission/exam-schedule.service.ts
src/app/raintree/transmission/exam-schedule.service.ts
+28
-0
src/app/raintree/transmission/routine-transmission.service.ts
...app/raintree/transmission/routine-transmission.service.ts
+0
-1
No files found.
src/app/portal/interface/class.ts
→
src/app/portal/
data-source/
interface/class.ts
View file @
e6d09e58
import
{
Data
}
from
"
.
./data-source/interface
/data
"
;
import
{
LocalizedField
}
from
"
.
./data-source/interface
/localizedField
"
;
import
{
Data
}
from
"
./data
"
;
import
{
LocalizedField
}
from
"
./localizedField
"
;
// ThemeDataSourceField Interface
...
...
src/app/portal/interface/section.ts
→
src/app/portal/
data-source/
interface/section.ts
View file @
e6d09e58
import
{
Data
}
from
"
.
./data-source/interface
/data
"
;
import
{
LocalizedField
}
from
"
.
./data-source/interface
/localizedField
"
;
import
{
Data
}
from
"
./data
"
;
import
{
LocalizedField
}
from
"
./localizedField
"
;
// ThemeDataSourceField Interface
...
...
src/app/portal/exam/exam/exam.component.html
View file @
e6d09e58
<p>
exam works!
</p>
<div
class=
"custom_table"
>
<app-custom-table
[columns]=
"columns"
[data]=
"data"
(emitEdit)=
"emitEditFromTable($event)"
(emitView)=
"emitViewFromTable($event)"
/>
</div>
<div
class=
"add_btn"
>
<app-square-button
[buttonIcon]=
"'add'"
(emitSquareButtonClick)=
"addExam()"
/>
</div>
\ No newline at end of file
src/app/portal/exam/exam/exam.component.scss
View file @
e6d09e58
.add_btn
{
position
:
fixed
;
bottom
:
20px
;
right
:
0
;
padding
:
0px
20px
;
margin
:
auto
;
}
\ No newline at end of file
src/app/portal/exam/exam/exam.component.ts
View file @
e6d09e58
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
Component
}
from
'
@angular/core
'
;
import
{
CustomTableComponent
}
from
'
../../../component-library/custom-table/custom-table.component
'
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
import
{
ManageComponent
}
from
'
../manage/manage.component
'
;
import
{
ExamScheduleService
}
from
'
../../../raintree/transmission/exam-schedule.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
DataSourceService
}
from
'
../../service/data-source.service
'
;
import
{
ExamScheduleResponse
}
from
'
../../../raintree/interface/exam-schedule-respons
'
;
import
{
PrepareExamTableDataService
}
from
'
../service/prepare-exam-table-data.service
'
;
@
Component
({
selector
:
'
app-exam
'
,
imports
:
[],
imports
:
[
CommonModule
,
CustomTableComponent
,
SquareButtonComponent
],
templateUrl
:
'
./exam.component.html
'
,
styleUrl
:
'
./exam.component.scss
'
})
export
class
ExamComponent
{
constructor
(
private
_dialog
:
MatDialog
,
private
_examSchedule
:
ExamScheduleService
,
private
_urlConfig
:
UrlConfigService
,
private
_prepareExamTableData
:
PrepareExamTableDataService
)
{
}
public
columns
:
any
=
[];
public
data
:
any
=
[];
ngOnInit
():
void
{
this
.
columns
=
this
.
_prepareExamTableData
.
prepareMatTableColumn
();
this
.
_getExamSchedule
();
}
public
emitViewFromTable
(
emitData
:
any
)
{
let
docLink
=
emitData
.
image
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
window
.
open
(
docLink
,
'
_blank
'
);
}
public
emitEditFromTable
(
emitData
:
string
):
void
{
let
dialogRef
=
this
.
_dialog
.
open
(
ManageComponent
,
{
data
:
emitData
,
width
:
'
98vw
'
,
height
:
'
auto
'
,
maxWidth
:
'
70vw
'
,
maxHeight
:
'
70vh
'
,
});
}
public
addExam
():
void
{
let
dialogRef
=
this
.
_dialog
.
open
(
ManageComponent
,
{
data
:
''
,
width
:
'
98vw
'
,
height
:
'
auto
'
,
maxWidth
:
'
70vw
'
,
maxHeight
:
'
70vh
'
,
});
}
private
_getExamSchedule
():
void
{
this
.
_examSchedule
.
getExamSchedule
(
TransmissionMapperService
.
GET_TRANSMISSION_URL
+
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
aggregationOnUniqueFld
:
false
,
datasourceId
:
DataSourceService
.
EXAM_SCHEDULE_DATA_SOURCE_ID
,
dontIncludeForeignKey
:
false
,
expand
:
false
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
language
:
"
en
"
,
limit
:
10
,
orderBy
:
"
ASC
"
,
page
:
1
,
roleBasedFiltering
:
true
}),
()
=>
{
},
(
response
)
=>
{
},
(
response
:
ExamScheduleResponse
)
=>
{
this
.
data
=
this
.
_prepareExamTableData
.
prepareMatTableData
(
response
.
data
.
themeDataSourceFields
);
},
(
error
)
=>
{
console
.
log
(
error
);
},
()
=>
{
}
)
}
}
src/app/portal/exam/interface/exam-schedule.ts
0 → 100644
View file @
e6d09e58
import
{
Data
}
from
"
../../data-source/interface/data
"
;
import
{
LocalizedField
}
from
"
../../data-source/interface/localizedField
"
;
// ThemeDataSourceField Interface
export
interface
ExamSchedules
extends
Data
{
themeDataSourceFields
:
ExamSchedule
[];
}
// ThemeDataSourceField Interface
export
interface
ExamSchedule
{
id
:
string
;
session
:
LocalizedField
;
Term
:
LocalizedField
;
image
:
LocalizedField
;
details
:
LocalizedField
;
class
:
LocalizedField
;
session_session_name
:
LocalizedField
;
class_details
:
LocalizedField
;
}
src/app/portal/exam/manage/manage.component.html
View file @
e6d09e58
<p
>
manage works!
</p
>
<p
re>
{{data|json}}
</pre
>
\ No newline at end of file
src/app/portal/exam/manage/manage.component.ts
View file @
e6d09e58
import
{
Component
}
from
'
@angular/core
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
Component
,
Inject
}
from
'
@angular/core
'
;
import
{
MAT_DIALOG_DATA
}
from
'
@angular/material/dialog
'
;
@
Component
({
selector
:
'
app-manage
'
,
imports
:
[],
imports
:
[
CommonModule
],
templateUrl
:
'
./manage.component.html
'
,
styleUrl
:
'
./manage.component.scss
'
})
export
class
ManageComponent
{
constructor
(
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
any
,
)
{
}
}
src/app/portal/exam/service/prepare-exam-table-data.service.spec.ts
0 → 100644
View file @
e6d09e58
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
PrepareExamTableDataService
}
from
'
./prepare-exam-table-data.service
'
;
describe
(
'
PrepareExamTableDataService
'
,
()
=>
{
let
service
:
PrepareExamTableDataService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
PrepareExamTableDataService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/portal/exam/service/prepare-exam-table-data.service.ts
0 → 100644
View file @
e6d09e58
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
ExamSchedule
}
from
'
../interface/exam-schedule
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
PrepareExamTableDataService
{
constructor
()
{
}
public
prepareMatTableData
(
data
:
ExamSchedule
[]):
any
{
let
dataArray
=
data
.
map
((
schedule
:
ExamSchedule
)
=>
{
return
{
[
'
id
'
]:
schedule
.
id
,
[
'
Term
'
]:
schedule
.
Term
[
'
en
'
],
[
'
image
'
]:
schedule
.
image
[
'
en
'
],
[
'
details
'
]:
schedule
.
details
[
'
en
'
],
[
'
class_details
'
]:
schedule
.
class_details
[
'
en
'
],
[
'
action
'
]:
[
'
view
'
,
'
edit
'
]
}
})
return
dataArray
;
}
public
prepareMatTableColumn
():
any
[]
{
let
columnArray
=
[
{
key
:
'
Term
'
,
label
:
'
Term
'
},
{
key
:
'
details
'
,
label
:
'
Details
'
},
{
key
:
'
class_details
'
,
label
:
'
Class
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
];
return
columnArray
;
}
}
src/app/portal/routine/manage/manage.component.ts
View file @
e6d09e58
...
...
@@ -8,14 +8,14 @@ import { classResponse } from '../../../raintree/interface/class-respons';
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
DropDownComponent
}
from
"
../../../component-library/dropdown/drop-down/drop-down.component
"
;
import
{
Dropdown
}
from
'
../../../component-library/dropdown/interface/dropdown
'
;
import
{
StudentClass
}
from
'
../../interface/class
'
;
import
{
StudentClass
}
from
'
../../
data-source/
interface/class
'
;
import
{
FormControl
,
FormControlName
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
MatFormFieldModule
}
from
'
@angular/material/form-field
'
;
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
MatIconModule
}
from
"
@angular/material/icon
"
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
SectionResponse
}
from
'
../../../raintree/interface/section-respons
'
;
import
{
StudentSection
}
from
'
../../interface/section
'
;
import
{
StudentSection
}
from
'
../../
data-source/
interface/section
'
;
import
{
RoutineTransmissionService
}
from
'
../../../raintree/transmission/routine-transmission.service
'
;
import
{
AuthService
}
from
'
../../../auth/service/auth.service
'
;
import
{
RaintreeResponse
}
from
'
../../../raintree/interface/raintree-response
'
;
...
...
src/app/portal/routine/routine/routine.component.ts
View file @
e6d09e58
...
...
@@ -51,15 +51,11 @@ export class RoutineComponent {
}
public
emitViewFromTable
(
emitData
:
any
)
{
// alert("Have to view the doc in another page");
// console.log();
let
docLink
=
emitData
.
schedule
.
replace
(
'
BASE_URL
'
,
TransmissionMapperService
.
DEV_TRANSMISSION_URL
);
window
.
open
(
docLink
,
'
_blank
'
);
}
public
emitEditFromTable
(
emitData
:
string
):
void
{
let
dialogRef
=
this
.
_dialog
.
open
(
ManageComponent
,
{
data
:
emitData
,
width
:
'
98vw
'
,
...
...
src/app/portal/service/data-source.service.ts
View file @
e6d09e58
...
...
@@ -11,5 +11,6 @@ export class DataSourceService {
public
static
readonly
ROUTINE_DATA_SOURCE_ID
:
number
=
3021
;
public
static
readonly
CLASS_DATA_SOURCE_ID
:
number
=
3008
;
public
static
readonly
SECTION_DATA_SOURCE_ID
:
number
=
3013
;
public
static
readonly
EXAM_SCHEDULE_DATA_SOURCE_ID
:
number
=
3018
;
}
src/app/raintree/interface/class-respons.ts
View file @
e6d09e58
import
{
Classes
}
from
"
../../portal/interface/class
"
;
import
{
Classes
}
from
"
../../portal/
data-source/
interface/class
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
...
...
src/app/raintree/interface/exam-schedule-respons.ts
0 → 100644
View file @
e6d09e58
import
{
ExamSchedules
}
from
"
../../portal/exam/interface/exam-schedule
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
export
interface
ExamScheduleResponse
extends
RaintreeResponse
{
data
:
ExamSchedules
}
\ No newline at end of file
src/app/raintree/interface/section-respons.ts
View file @
e6d09e58
import
{
Sections
}
from
"
../../portal/interface/section
"
;
import
{
Sections
}
from
"
../../portal/
data-source/
interface/section
"
;
import
{
RaintreeResponse
}
from
"
./raintree-response
"
;
...
...
src/app/raintree/transmission/exam-schedule.service.spec.ts
0 → 100644
View file @
e6d09e58
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
ExamScheduleService
}
from
'
./exam-schedule.service
'
;
describe
(
'
ExamScheduleService
'
,
()
=>
{
let
service
:
ExamScheduleService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
ExamScheduleService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/raintree/transmission/exam-schedule.service.ts
0 → 100644
View file @
e6d09e58
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
TransmissionService
}
from
'
./transmission.service
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
ExamScheduleService
extends
TransmissionService
{
public
getExamSchedule
(
url
:
string
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
any
)
=>
void
,
onSuccess
:
(
response
:
any
)
=>
void
,
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
):
void
{
this
.
executePostPayload
(
url
,
{},
onPreExecute
,
onPostExecute
,
onSuccess
,
onFailure
,
onComplete
,
true
);
}
}
src/app/raintree/transmission/routine-transmission.service.ts
View file @
e6d09e58
...
...
@@ -8,7 +8,6 @@ export class RoutineTransmissionService extends TransmissionService{
public
getRoutine
(
url
:
string
,
payload
:
string
,
onPreExecute
:
()
=>
void
,
onPostExecute
:
(
response
:
any
)
=>
void
,
onSuccess
:
(
response
:
any
)
=>
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