Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Requirement Formalization Tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thodoris Nestoridis
Requirement Formalization Tool
Commits
e3083e2d
Commit
e3083e2d
authored
Mar 04, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
angular working version 0.2
parent
68e6abca
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
79 deletions
+62
-79
add-boilerplate.component.ts
...p/components/add-boilerplate/add-boilerplate.component.ts
+1
-1
main-details.component.ts
...src/app/components/main-details/main-details.component.ts
+17
-5
main-list.component.ts
...lar11/src/app/components/main-list/main-list.component.ts
+0
-21
prefix-details.component.ts
...app/components/prefix-details/prefix-details.component.ts
+20
-5
prefix-list.component.ts
...1/src/app/components/prefix-list/prefix-list.component.ts
+2
-22
suffix-details.component.ts
...app/components/suffix-details/suffix-details.component.ts
+19
-4
suffix-list.component.ts
...1/src/app/components/suffix-list/suffix-list.component.ts
+3
-21
No files found.
reqtool/ReqmanAngular11/src/app/components/add-boilerplate/add-boilerplate.component.ts
View file @
e3083e2d
...
...
@@ -37,7 +37,7 @@ export class AddBoilerplateComponent implements OnInit {
this
.
boilerplatelService
.
create
(
data
)
.
subscribe
(
response
=>
{
console
.
log
(
response
);
this
.
notifier
.
notify
(
"success"
,(
JSON
.
stringify
(
response
))
);
this
.
submitted
=
true
;
this
.
router
.
navigate
([
'/boilerplates'
]);
},
...
...
reqtool/ReqmanAngular11/src/app/components/main-details/main-details.component.ts
View file @
e3083e2d
...
...
@@ -52,6 +52,7 @@ export class MainDetailsComponent implements OnInit {
public
static
id
:
any
[]
=
[];
private
readonly
notifier
:
NotifierService
;
mains
?:
Main
[];
currentmain
:
Main
=
{
sys_fun_inter
:
""
,
...
...
@@ -113,10 +114,7 @@ export class MainDetailsComponent implements OnInit {
ngOnInit
():
void
{
this
.
getchoices
();
for
(
let
i
=
0
;
i
<
MainDetailsComponent
.
id
.
length
;
i
++
)
{
this
.
getMain
(
this
.
route
.
snapshot
.
params
.
id
,
MainDetailsComponent
.
id
[
i
]);
};
this
.
getAllMain
(
this
.
route
.
snapshot
.
params
.
id
);
}
...
...
@@ -125,7 +123,21 @@ export class MainDetailsComponent implements OnInit {
return
data
.
filter
(
option
=>
option
.
toLowerCase
().
indexOf
(
filterValue
)
===
0
);
}
getAllMain
(
id
:
string
):
void
{
this
.
mainService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
MainDetailsComponent
.
id
.
length
=
0
;
this
.
mains
=
data
;
for
(
var
val
of
data
)
{
MainDetailsComponent
.
id
.
push
(
val
.
id
);
this
.
getMain
(
id
,
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
getMain
(
main
:
any
,
id
:
string
):
void
{
//PrefixDetailsComponent.id = id;
this
.
mainService
.
get
(
main
,
id
)
...
...
reqtool/ReqmanAngular11/src/app/components/main-list/main-list.component.ts
View file @
e3083e2d
...
...
@@ -2,12 +2,10 @@ import { Component, OnInit } from '@angular/core';
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
Main
}
from
'src/app/models/main.model'
;
import
{
MainService
}
from
'src/app/services/main.service'
;
import
{
MainDetailsComponent
}
from
'src/app/components/main-details/main-details.component'
;
@
Component
({
selector
:
'app-main-list'
,
providers
:
[
MainDetailsComponent
],
templateUrl
:
'./main-list.component.html'
,
styleUrls
:
[
'./main-list.component.scss'
]
})
...
...
@@ -16,29 +14,10 @@ export class MainListComponent implements OnInit {
constructor
(
private
mainService
:
MainService
,
private
mainDetails
:
MainDetailsComponent
,
private
route
:
ActivatedRoute
,
private
router
:
Router
)
{
}
ngOnInit
():
void
{
this
.
getAllMain
(
this
.
route
.
snapshot
.
params
.
id
);
}
getAllMain
(
id
:
string
):
void
{
this
.
mainService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
MainDetailsComponent
.
id
.
length
=
0
;
this
.
mains
=
data
;
for
(
var
val
of
data
)
{
//this.mainDetails.getMain(id, val.id);
MainDetailsComponent
.
id
.
push
(
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
}
reqtool/ReqmanAngular11/src/app/components/prefix-details/prefix-details.component.ts
View file @
e3083e2d
...
...
@@ -38,6 +38,7 @@ export class PrefixDetailsComponent implements OnInit {
public
static
id
:
any
[]
=
[];
private
readonly
notifier
:
NotifierService
;
prefixs
?:
Prefix
[];
//for the moment only one prefix can showed/updates
currentprefix
:
Prefix
=
{
...
...
@@ -78,10 +79,8 @@ export class PrefixDetailsComponent implements OnInit {
ngOnInit
():
void
{
this
.
getchoices
();
for
(
let
i
=
0
;
i
<
PrefixDetailsComponent
.
id
.
length
;
i
++
)
{
this
.
getPrefix
(
this
.
route
.
snapshot
.
params
.
id
,
PrefixDetailsComponent
.
id
[
i
]);
};
this
.
getAllPrefix
(
this
.
route
.
snapshot
.
params
.
id
);
}
private
_filter
(
data
:
string
[],
value
:
string
):
string
[]
{
...
...
@@ -89,6 +88,22 @@ export class PrefixDetailsComponent implements OnInit {
return
data
.
filter
(
option
=>
option
.
toLowerCase
().
indexOf
(
filterValue
)
===
0
);
}
getAllPrefix
(
id
:
string
):
void
{
this
.
prefixService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
PrefixDetailsComponent
.
id
.
length
=
0
;
this
.
prefixs
=
data
;
//console.log(data);
for
(
var
val
of
data
)
{
this
.
getPrefix
(
id
,
val
.
id
);
PrefixDetailsComponent
.
id
.
push
(
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
getPrefix
(
prefix
:
any
,
id
:
string
):
void
{
//PrefixDetailsComponent.id = id;
...
...
@@ -96,7 +111,7 @@ export class PrefixDetailsComponent implements OnInit {
.
subscribe
(
data
=>
{
this
.
currentprefix
=
data
;
console
.
log
(
data
)
//
console.log(data)
this
.
simpleprefixControl
.
setValue
(
this
.
currentprefix
.
prefix
);
this
.
subjectsControl
.
setValue
(
this
.
currentprefix
.
system_fun_item
);
this
.
verbsControl
.
setValue
(
this
.
currentprefix
.
state_or_verb
);
...
...
reqtool/ReqmanAngular11/src/app/components/prefix-list/prefix-list.component.ts
View file @
e3083e2d
...
...
@@ -2,45 +2,25 @@ import { Component, OnInit } from '@angular/core';
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
Prefix
}
from
'src/app/models/prefix.model'
;
import
{
PrefixService
}
from
'src/app/services/prefix.service'
;
import
{
PrefixDetailsComponent
}
from
'src/app/components/prefix-details/prefix-details.component'
;
@
Component
({
selector
:
'app-prefix-list'
,
providers
:
[
PrefixDetailsComponent
],
templateUrl
:
'./prefix-list.component.html'
,
styleUrls
:
[
'./prefix-list.component.scss'
]
})
export
class
PrefixListComponent
implements
OnInit
{
prefixs
?:
Prefix
[];
constructor
(
private
prefixService
:
PrefixService
,
private
prefixDetails
:
PrefixDetailsComponent
,
private
route
:
ActivatedRoute
,
private
router
:
Router
)
{
}
ngOnInit
():
void
{
this
.
getAllPrefix
(
this
.
route
.
snapshot
.
params
.
id
);
//console.log("The boilerplate", this.route.snapshot.params.id);
}
getAllPrefix
(
id
:
string
):
void
{
this
.
prefixService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
PrefixDetailsComponent
.
id
.
length
=
0
;
this
.
prefixs
=
data
;
//console.log(data);
for
(
var
val
of
data
)
{
//this.prefixDetails.getPrefix(id, val.id);
PrefixDetailsComponent
.
id
.
push
(
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
}
reqtool/ReqmanAngular11/src/app/components/suffix-details/suffix-details.component.ts
View file @
e3083e2d
...
...
@@ -29,6 +29,7 @@ export class SuffixDetailsComponent implements OnInit {
public
static
id
:
any
[]
=
[];
private
readonly
notifier
:
NotifierService
;
suffixs
?:
Suffix
[];
currentsuffix
:
Suffix
=
{
s_choices
:
""
,
...
...
@@ -61,10 +62,7 @@ export class SuffixDetailsComponent implements OnInit {
ngOnInit
():
void
{
this
.
getchoices
();
for
(
let
i
=
0
;
i
<
SuffixDetailsComponent
.
id
.
length
;
i
++
)
{
this
.
getSuffix
(
this
.
route
.
snapshot
.
params
.
id
,
SuffixDetailsComponent
.
id
[
i
]);
};
this
.
getAllSuffix
(
this
.
route
.
snapshot
.
params
.
id
);
}
private
_filter
(
data
:
string
[],
value
:
string
):
string
[]
{
...
...
@@ -73,6 +71,23 @@ export class SuffixDetailsComponent implements OnInit {
}
getAllSuffix
(
id
:
string
):
void
{
this
.
suffixService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
SuffixDetailsComponent
.
id
.
length
=
0
;
this
.
suffixs
=
data
;
console
.
log
(
data
)
for
(
var
val
of
data
)
{
this
.
getSuffix
(
id
,
val
.
id
);
SuffixDetailsComponent
.
id
.
push
(
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
getSuffix
(
main
:
any
,
id
:
string
):
void
{
//PrefixDetailsComponent.id = id;
this
.
suffixService
.
get
(
main
,
id
)
...
...
reqtool/ReqmanAngular11/src/app/components/suffix-list/suffix-list.component.ts
View file @
e3083e2d
...
...
@@ -2,43 +2,25 @@ import { Component, OnInit } from '@angular/core';
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
Suffix
}
from
'src/app/models/suffix.model'
;
import
{
SuffixService
}
from
'src/app/services/suffix.service'
;
import
{
SuffixDetailsComponent
}
from
'src/app/components/suffix-details/suffix-details.component'
;
import
{
PrefixDetailsComponent
}
from
'../prefix-details/prefix-details.component'
;
@
Component
({
selector
:
'app-suffix-list'
,
providers
:
[
SuffixDetailsComponent
],
templateUrl
:
'./suffix-list.component.html'
,
styleUrls
:
[
'./suffix-list.component.scss'
]
})
export
class
SuffixListComponent
implements
OnInit
{
suffixs
?:
Suffix
[];
constructor
(
private
suffixService
:
SuffixService
,
private
suffixDetails
:
SuffixDetailsComponent
,
private
route
:
ActivatedRoute
,
private
router
:
Router
)
{
}
ngOnInit
():
void
{
this
.
getAllSuffix
(
this
.
route
.
snapshot
.
params
.
id
);
}
getAllSuffix
(
id
:
string
):
void
{
this
.
suffixService
.
getAll
(
id
)
.
subscribe
(
data
=>
{
SuffixDetailsComponent
.
id
.
length
=
0
;
this
.
suffixs
=
data
;
for
(
var
val
of
data
)
{
//this.mainDetails.getMain(id, val.id);
SuffixDetailsComponent
.
id
.
push
(
val
.
id
);
}
},
error
=>
{
console
.
log
(
error
);
});
}
}
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