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
e9839860
Commit
e9839860
authored
Mar 31, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: routine submit form
parent
43e90da7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
183 additions
and
175 deletions
+183
-175
src/app/portal/data-source/interface/data.ts
src/app/portal/data-source/interface/data.ts
+2
-1
src/app/portal/data-source/interface/localizedField.ts
src/app/portal/data-source/interface/localizedField.ts
+1
-1
src/app/portal/navigation/sidebar/sidebar.component.scss
src/app/portal/navigation/sidebar/sidebar.component.scss
+1
-1
src/app/portal/routine/interface/routine.ts
src/app/portal/routine/interface/routine.ts
+4
-3
src/app/portal/routine/manage/manage.component.ts
src/app/portal/routine/manage/manage.component.ts
+175
-169
No files found.
src/app/portal/data-source/interface/data.ts
View file @
e9839860
...
@@ -3,7 +3,7 @@ import { ForeignKeyMap } from "./foreignKeyMap";
...
@@ -3,7 +3,7 @@ import { ForeignKeyMap } from "./foreignKeyMap";
// Data Interface
// Data Interface
export
interface
Data
{
export
interface
Data
{
count
:
number
;
count
:
number
;
id
:
number
;
id
:
number
|
string
;
dataSourceName
:
string
;
dataSourceName
:
string
;
websiteId
:
number
;
websiteId
:
number
;
type
:
string
;
type
:
string
;
...
@@ -15,4 +15,5 @@ export interface Data {
...
@@ -15,4 +15,5 @@ export interface Data {
dependentFields
:
any
;
dependentFields
:
any
;
dsType
:
any
;
dsType
:
any
;
[
index
:
string
]:
any
;
[
index
:
string
]:
any
;
}
}
\ No newline at end of file
src/app/portal/data-source/interface/localizedField.ts
View file @
e9839860
// LocalizedField Interface (replaces repeated language-specific fields)
// LocalizedField Interface (replaces repeated language-specific fields)
export
interface
LocalizedField
{
export
interface
LocalizedField
{
default
:
string
;
default
?
:
string
;
beng
:
string
;
beng
:
string
;
hindi
:
string
;
hindi
:
string
;
en
:
string
;
en
:
string
;
...
...
src/app/portal/navigation/sidebar/sidebar.component.scss
View file @
e9839860
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
height
:
100%
;
justify-content
:
space-between
;
justify-content
:
space-between
;
position
:
relative
;
//
position: relative;
}
}
.sidebar_navigation_container
a
{
.sidebar_navigation_container
a
{
...
...
src/app/portal/routine/interface/routine.ts
View file @
e9839860
...
@@ -4,6 +4,7 @@ import { LocalizedField } from "../../data-source/interface/localizedField";
...
@@ -4,6 +4,7 @@ import { LocalizedField } from "../../data-source/interface/localizedField";
// ThemeDataSourceField Interface
// ThemeDataSourceField Interface
export
interface
Routines
extends
Data
{
export
interface
Routines
extends
Data
{
themeDataSourceFields
:
Routine
[];
themeDataSourceFields
:
Routine
[];
dataSourceTypeFieldsList
?:
Routine
[]
}
}
// ThemeDataSourceField Interface
// ThemeDataSourceField Interface
...
@@ -16,8 +17,8 @@ export interface Routine {
...
@@ -16,8 +17,8 @@ export interface Routine {
session
:
LocalizedField
;
session
:
LocalizedField
;
document
:
LocalizedField
;
document
:
LocalizedField
;
routine_type
:
LocalizedField
;
routine_type
:
LocalizedField
;
session_session_name
:
LocalizedField
;
session_session_name
?
:
LocalizedField
;
class_details
:
LocalizedField
;
class_details
?
:
LocalizedField
;
section_details
:
LocalizedField
;
section_details
?
:
LocalizedField
;
}
}
src/app/portal/routine/manage/manage.component.ts
View file @
e9839860
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
CommonModule
}
from
"
@angular/common
"
;
import
{
Component
,
Inject
}
from
'
@angular/core
'
;
import
{
Component
,
Inject
}
from
"
@angular/core
"
;
import
{
MAT_DIALOG_DATA
}
from
'
@angular/material/dialog
'
;
import
{
MAT_DIALOG_DATA
}
from
"
@angular/material/dialog
"
;
import
{
ClassTransmissionService
}
from
'
../../../raintree/transmission/class-transmission.service
'
;
import
{
ClassTransmissionService
}
from
"
../../../raintree/transmission/class-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
{
classResponse
}
from
'
../../../raintree/interface/class-respons
'
;
import
{
classResponse
}
from
"
../../../raintree/interface/class-respons
"
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
import
{
UrlConfigService
}
from
"
../../service/url-config.service
"
;
import
{
DropDownComponent
}
from
"
../../../component-library/dropdown/drop-down/drop-down.component
"
;
import
{
DropDownComponent
}
from
"
../../../component-library/dropdown/drop-down/drop-down.component
"
;
import
{
Dropdown
}
from
'
../../../component-library/dropdown/interface/dropdown
'
;
import
{
Dropdown
}
from
"
../../../component-library/dropdown/interface/dropdown
"
;
import
{
StudentClass
}
from
'
../../data-source/interface/class
'
;
import
{
StudentClass
}
from
"
../../data-source/interface/class
"
;
import
{
FormControl
,
FormControlName
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
import
{
MatFormFieldModule
}
from
'
@angular/material/form-field
'
;
FormControl
,
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
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
{
MatIconModule
}
from
"
@angular/material/icon
"
;
import
{
SquareButtonComponent
}
from
'
../../../component-library/square-button/square-button.component
'
;
import
{
SquareButtonComponent
}
from
"
../../../component-library/square-button/square-button.component
"
;
import
{
SectionResponse
}
from
'
../../../raintree/interface/section-respons
'
;
import
{
SectionResponse
}
from
"
../../../raintree/interface/section-respons
"
;
import
{
StudentSection
}
from
'
../../data-source/interface/section
'
;
import
{
StudentSection
}
from
"
../../data-source/interface/section
"
;
import
{
RoutineTransmissionService
}
from
'
../../../raintree/transmission/routine-transmission.service
'
;
import
{
RoutineTransmissionService
}
from
"
../../../raintree/transmission/routine-transmission.service
"
;
import
{
AuthService
}
from
'
../../../auth/service/auth.service
'
;
import
{
AuthService
}
from
"
../../../auth/service/auth.service
"
;
import
{
RaintreeResponse
}
from
'
../../../raintree/interface/raintree-response
'
;
import
{
RaintreeResponse
}
from
"
../../../raintree/interface/raintree-response
"
;
import
{
Routines
}
from
"
../interface/routine
"
;
@
Component
({
@
Component
({
selector
:
'
app-manage
'
,
selector
:
"
app-manage
"
,
imports
:
[
imports
:
[
CommonModule
,
CommonModule
,
DropDownComponent
,
DropDownComponent
,
...
@@ -29,30 +36,28 @@ import { RaintreeResponse } from '../../../raintree/interface/raintree-response'
...
@@ -29,30 +36,28 @@ import { RaintreeResponse } from '../../../raintree/interface/raintree-response'
MatFormFieldModule
,
MatFormFieldModule
,
MatInputModule
,
MatInputModule
,
MatIconModule
,
MatIconModule
,
SquareButtonComponent
SquareButtonComponent
,
],
],
templateUrl
:
'
./manage.component.html
'
,
templateUrl
:
"
./manage.component.html
"
,
styleUrl
:
'
./manage.component.scss
'
styleUrl
:
"
./manage.component.scss
"
,
})
})
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
,
private
_auth
:
AuthService
private
_auth
:
AuthService
)
{
}
)
{}
public
classDropDownData
:
Dropdown
[]
=
[]
public
classDropDownData
:
Dropdown
[]
=
[]
;
public
sectionDropDownData
:
Dropdown
[]
=
[]
public
sectionDropDownData
:
Dropdown
[]
=
[]
;
public
routineForm
=
new
FormGroup
({
public
routineForm
=
new
FormGroup
({
details
:
new
FormControl
(
''
,
[
Validators
.
required
])
details
:
new
FormControl
(
""
,
[
Validators
.
required
]),
})
})
;
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
_getClasses
();
this
.
_getClasses
();
this
.
_getSection
();
this
.
_getSection
();
}
}
...
@@ -66,8 +71,9 @@ export class ManageComponent {
...
@@ -66,8 +71,9 @@ export class ManageComponent {
}
}
public
submitRoutine
():
void
{
public
submitRoutine
():
void
{
// alert("Submit Clicked!!");
console
.
log
(
this
.
routineFormPayload
);
alert
(
"
Submit Clicked!!
"
)
// this._routineTransmission.submitRoutine(
// this._routineTransmission.submitRoutine(
// TransmissionMapperService.SAVE_TRANSMISSION_URL + `websiteId=${this._auth.localStorageGetItemByKey('project_id')}`,
// TransmissionMapperService.SAVE_TRANSMISSION_URL + `websiteId=${this._auth.localStorageGetItemByKey('project_id')}`,
...
@@ -78,170 +84,170 @@ export class ManageComponent {
...
@@ -78,170 +84,170 @@ export class ManageComponent {
// (response: RaintreeResponse) => {
// (response: RaintreeResponse) => {
// console.log(response);
// console.log(response);
// },
// },
// (error) => {
// (error) => {
// console.log(error);
// console.log(error);
// },
// },
// () => { }
// () => { }
// );
// );
}
}
private
_getClasses
()
{
private
_getClasses
()
{
this
.
_classTransmission
.
getClasses
(
this
.
_classTransmission
.
getClasses
(
TransmissionMapperService
.
GET_TRANSMISSION_URL
+
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
TransmissionMapperService
.
GET_TRANSMISSION_URL
+
aggregationOnUniqueFld
:
false
,
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
datasourceId
:
DataSourceService
.
CLASS_DATA_SOURCE_ID
,
aggregationOnUniqueFld
:
false
,
dontIncludeForeignKey
:
false
,
datasourceId
:
DataSourceService
.
CLASS_DATA_SOURCE_ID
,
expand
:
false
,
dontIncludeForeignKey
:
false
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
expand
:
false
,
language
:
"
en
"
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
limit
:
100
,
language
:
"
en
"
,
orderBy
:
"
ASC
"
,
limit
:
100
,
page
:
1
,
orderBy
:
"
ASC
"
,
roleBasedFiltering
:
true
page
:
1
,
}),
roleBasedFiltering
:
true
,
()
=>
{
},
}),
(
response
)
=>
{
},
()
=>
{},
(
response
)
=>
{},
(
response
:
classResponse
)
=>
{
(
response
:
classResponse
)
=>
{
this
.
classDropDownData
=
response
.
data
[
"
themeDataSourceFields
"
].
map
(
this
.
classDropDownData
=
response
.
data
[
'
themeDataSourceFields
'
].
map
((
sClass
:
StudentClass
)
=>
{
(
sClass
:
StudentClass
)
=>
{
return
{
return
{
[
'
name
'
]:
sClass
.
details
[
'
en
'
],
[
"
name
"
]:
sClass
.
details
[
"
en
"
],
[
'
value
'
]:
sClass
.
id
[
"
value
"
]:
sClass
.
id
,
};
}
}
})
);
},
},
(
error
)
=>
{
(
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
},
},
()
=>
{
}
()
=>
{}
)
)
;
}
}
private
_getSection
(){
private
_getSection
()
{
this
.
_classTransmission
.
getSection
(
this
.
_classTransmission
.
getSection
(
TransmissionMapperService
.
GET_TRANSMISSION_URL
+
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
TransmissionMapperService
.
GET_TRANSMISSION_URL
+
aggregationOnUniqueFld
:
false
,
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
datasourceId
:
DataSourceService
.
SECTION_DATA_SOURCE_ID
,
aggregationOnUniqueFld
:
false
,
dontIncludeForeignKey
:
false
,
datasourceId
:
DataSourceService
.
SECTION_DATA_SOURCE_ID
,
expand
:
false
,
dontIncludeForeignKey
:
false
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
expand
:
false
,
language
:
"
en
"
,
isUniqueValueRequiredForFieldToDisplay
:
false
,
limit
:
100
,
language
:
"
en
"
,
orderBy
:
"
ASC
"
,
limit
:
100
,
page
:
1
,
orderBy
:
"
ASC
"
,
roleBasedFiltering
:
true
page
:
1
,
}),
roleBasedFiltering
:
true
,
()
=>
{
},
}),
(
response
)
=>
{
},
()
=>
{},
(
response
)
=>
{},
(
response
:
SectionResponse
)
=>
{
(
response
:
SectionResponse
)
=>
{
this
.
sectionDropDownData
=
response
.
data
[
'
themeDataSourceFields
'
].
map
((
sSection
:
StudentSection
)
=>
{
this
.
sectionDropDownData
=
response
.
data
[
"
themeDataSourceFields
"
].
map
(
return
{
(
sSection
:
StudentSection
)
=>
{
[
'
name
'
]:
sSection
.
section
[
'
en
'
],
return
{
[
'
value
'
]:
sSection
.
id
[
"
name
"
]:
sSection
.
section
[
"
en
"
],
[
"
value
"
]:
sSection
.
id
,
};
}
}
})
);
},
},
(
error
)
=>
{
(
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
},
},
()
=>
{
}
()
=>
{}
)
)
;
}
}
private
routineFormPayload
:
Routines
=
{
private
routineFormPayload
=
themeDataSourceFields
:
[
{
"
themeDataSourceFields
"
:
[
{
{
"
id
"
:
""
,
id
:
""
,
"
class
"
:
{
class
:
{
"
en
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
en
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
"
beng
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
beng
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
"
hindi
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
hindi
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
},
},
"
section
"
:
{
section
:
{
"
en
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
en
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
"
beng
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
beng
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
"
hindi
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
hindi
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
},
},
"
schedule
"
:
{
schedule
:
{
"
en
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
en
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
"
beng
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
beng
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
"
hindi
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
hindi
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
},
},
"
details
"
:
{
details
:
{
"
en
"
:
"
test 1 c
"
,
en
:
"
test 1 c
"
,
"
beng
"
:
"
test 1 c
"
,
beng
:
"
test 1 c
"
,
"
hindi
"
:
"
test 1 c
"
hindi
:
"
test 1 c
"
,
},
},
"
session
"
:
{
session
:
{
"
en
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
en
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
"
beng
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
beng
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
"
hindi
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
hindi
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
},
},
"
document
"
:
{
document
:
{
"
en
"
:
""
,
en
:
""
,
"
beng
"
:
""
,
beng
:
""
,
"
hindi
"
:
""
hindi
:
""
,
},
},
"
routine_type
"
:
{
routine_type
:
{
"
en
"
:
"
class_routine
"
,
en
:
"
class_routine
"
,
"
beng
"
:
"
class_routine
"
,
beng
:
"
class_routine
"
,
"
hindi
"
:
"
class_routine
"
hindi
:
"
class_routine
"
,
}
},
}
}
,
],
],
"
dataSourceName
"
:
"
Routine
"
,
dataSourceName
:
"
Routine
"
,
"
id
"
:
"
3021
"
,
id
:
"
3021
"
,
"
type
"
:
"
1327
"
,
type
:
"
1327
"
,
"
themeId
"
:
"
278
"
,
themeId
:
"
278
"
,
"
slideLst
"
:
null
,
slideLst
:
null
,
"
heading
"
:
"
undefined
"
,
heading
:
"
undefined
"
,
"
dataSourceTypeFieldsList
"
:
[
dataSourceTypeFieldsList
:
[
{
{
"
id
"
:
""
,
id
:
""
,
"
class
"
:
{
class
:
{
"
en
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
en
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
"
beng
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
beng
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
"
hindi
"
:
"
48f353051f9d724f619491d4f0d0a8ec
"
hindi
:
"
48f353051f9d724f619491d4f0d0a8ec
"
,
},
},
"
section
"
:
{
section
:
{
"
en
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
en
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
"
beng
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
beng
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
"
hindi
"
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
hindi
:
"
5d53b27058d1f6067a4b4bd1350a24d4
"
,
},
},
"
schedule
"
:
{
schedule
:
{
"
en
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
en
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
"
beng
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
beng
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
"
hindi
"
:
"
BASE_URL/webomagic/getFile?fid=2910
"
hindi
:
"
BASE_URL/webomagic/getFile?fid=2910
"
,
},
},
"
details
"
:
{
details
:
{
"
en
"
:
"
test 1 c
"
,
en
:
"
test 1 c
"
,
"
beng
"
:
"
test 1 c
"
,
beng
:
"
test 1 c
"
,
"
hindi
"
:
"
test 1 c
"
hindi
:
"
test 1 c
"
,
},
},
"
session
"
:
{
session
:
{
"
en
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
en
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
"
beng
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
beng
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
"
hindi
"
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
hindi
:
"
86af4d6b5675a82df4581f00c67f0c7f
"
,
},
},
"
document
"
:
{
document
:
{
"
en
"
:
""
,
en
:
""
,
"
beng
"
:
""
,
beng
:
""
,
"
hindi
"
:
""
hindi
:
""
,
},
},
"
routine_type
"
:
{
routine_type
:
{
"
en
"
:
"
class_routine
"
,
en
:
"
class_routine
"
,
"
beng
"
:
"
class_routine
"
,
beng
:
"
class_routine
"
,
"
hindi
"
:
"
class_routine
"
hindi
:
"
class_routine
"
,
}
},
}
}
,
]
],
}
};
}
}
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