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
7c90d07a
Commit
7c90d07a
authored
Feb 25, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefix details
parent
5b62f738
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
59 deletions
+158
-59
boilerplate-details.component.html
...ts/boilerplate-details/boilerplate-details.component.html
+2
-2
boilerplate-details.component.scss
...ts/boilerplate-details/boilerplate-details.component.scss
+4
-0
prefix-details.component.html
...p/components/prefix-details/prefix-details.component.html
+108
-42
prefix-details.component.ts
...app/components/prefix-details/prefix-details.component.ts
+44
-14
prefix-list.component.html
...src/app/components/prefix-list/prefix-list.component.html
+0
-1
No files found.
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.html
View file @
7c90d07a
<app-prefix-list></app-prefix-list>
<div>
<div
*
ngIf=
"currentboilerplate.id"
class=
"edit-form"
>
<h4>
Boilerplate
</h4>
...
...
@@ -13,14 +14,13 @@
/>
</div>
<div
style=
"display: flex; flex-grow: grow"
>
<form
class=
"
example-form form-inline
"
>
<form
class=
"
form-group form-inline
"
>
<mat-checkbox
class=
"example-full-width"
[(
ngModel
)]="
currentboilerplate
.
has_prefix
"
name=
"has_prefix"
>
Prefix
</mat-checkbox>
</form>
<app-prefix-details></app-prefix-details>
</div>
<div
class=
"form-group"
>
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.scss
View file @
7c90d07a
...
...
@@ -12,3 +12,7 @@
.example-full-width
{
width
:
auto
;
}
.form-group
{
min-width
:
150px
;
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/prefix-details/prefix-details.component.html
View file @
7c90d07a
<app-prefix-list></app-prefix-list>
<form
class=
"form-group form-inline"
>
<div
class=
"form-row"
>
<div
class=
"col"
>
<form
class=
"form-group form-inline"
>
<mat-form-field
class=
"example-full-width"
>
<mat-label>
Prefix
</mat-label>
<input
type=
"text"
...
...
@@ -15,8 +16,10 @@
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
<form
class=
"example-form form-inline"
>
</form>
</div>
<div
class=
"col"
>
<form
class=
"example-form form-inline"
>
<mat-form-field>
<mat-label>
Subject
</mat-label>
<input
type=
"text"
...
...
@@ -32,14 +35,77 @@
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
<button
</form>
</div>
<div
class=
"col"
>
<form
class=
"example-form form-inline"
>
<mat-form-field>
<mat-label>
Verb or State
</mat-label>
<input
type=
"text"
placeholder=
"Pick one"
aria-label=
"Number"
matInput
[
formControl
]="
verbsControl
"
[
matAutocomplete
]="
autoverb
"
>
<mat-autocomplete
autoActiveFirstOption
#
autoverb=
"matAutocomplete"
>
<mat-option
*
ngFor=
"let option of verbsfilteredOptions | async"
[
value
]="
option
"
>
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div
class=
"col"
>
<form
class=
"example-form form-inline"
>
<mat-form-field>
<mat-label>
Object
</mat-label>
<input
type=
"text"
placeholder=
"Pick one"
aria-label=
"Number"
matInput
[
formControl
]="
objectsControl
"
[
matAutocomplete
]="
autobjects
"
>
<mat-autocomplete
autoActiveFirstOption
#
autobjects=
"matAutocomplete"
>
<mat-option
*
ngFor=
"let option of objectsfilteredOptions | async"
[
value
]="
option
"
>
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div
class=
"col"
>
<form
class=
"example-form form-inline"
>
<fieldset
disabled
>
<mat-form-field>
<mat-label>
Logic connectivity
</mat-label>
<input
type=
"text"
placeholder=
"Pick one"
aria-label=
"Number"
matInput
[
formControl
]="
logic_conControl
"
[
matAutocomplete
]="
autolog_con
"
>
<mat-autocomplete
autoActiveFirstOption
#
autolog_con=
"matAutocomplete"
>
<mat-option
*
ngFor=
"let option of logic_confilteredOptions | async"
[
value
]="
option
"
>
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</fieldset>
</form>
</div>
<div
class=
"col"
>
<button
type=
"submit"
class=
"badge badge-success mb-2"
(
click
)="
updatePrefix
()"
>
>
Update
</button>
</button>
</div>
</div>
<!--
...
...
reqtool/ReqmanAngular11/src/app/components/prefix-details/prefix-details.component.ts
View file @
7c90d07a
...
...
@@ -23,12 +23,22 @@ export class PrefixDetailsComponent implements OnInit {
subjects
:
string
[]
=
[];
subjectsfilteredOptions
:
Observable
<
string
[]
>
;
verbs
=
[];
objects
=
[];
logic_con
=
[];
verbsControl
=
new
FormControl
();
verbs
:
string
[]
=
[];
verbsfilteredOptions
:
Observable
<
string
[]
>
;
objectsControl
=
new
FormControl
();
objects
:
string
[]
=
[];
objectsfilteredOptions
:
Observable
<
string
[]
>
;
logic_conControl
=
new
FormControl
();
logic_con
:
string
[]
=
[];
logic_confilteredOptions
:
Observable
<
string
[]
>
;
public
static
id
:
any
[]
=
[];
private
readonly
notifier
:
NotifierService
;
disable
=
true
;
//for the moment only one prefix can showed/updates
currentprefix
:
Prefix
=
{
...
...
@@ -53,6 +63,18 @@ export class PrefixDetailsComponent implements OnInit {
startWith
(
""
),
map
(
value
=>
this
.
_filter
(
this
.
subjects
,
value
))
);
this
.
verbsfilteredOptions
=
this
.
verbsControl
.
valueChanges
.
pipe
(
startWith
(
""
),
map
(
value
=>
this
.
_filter
(
this
.
verbs
,
value
))
);
this
.
objectsfilteredOptions
=
this
.
objectsControl
.
valueChanges
.
pipe
(
startWith
(
""
),
map
(
value
=>
this
.
_filter
(
this
.
objects
,
value
))
);
this
.
logic_confilteredOptions
=
this
.
logic_conControl
.
valueChanges
.
pipe
(
startWith
(
""
),
map
(
value
=>
this
.
_filter
(
this
.
logic_con
,
value
))
);
}
ngOnInit
():
void
{
...
...
@@ -65,9 +87,6 @@ export class PrefixDetailsComponent implements OnInit {
private
_filter
(
data
:
string
[],
value
:
string
):
string
[]
{
const
filterValue
=
value
.
toLowerCase
();
this
.
currentprefix
.
prefix
=
this
.
simpleprefixControl
.
value
;
this
.
currentprefix
.
system_fun_item
=
this
.
subjectsControl
.
value
;
return
data
.
filter
(
option
=>
option
.
toLowerCase
().
indexOf
(
filterValue
)
===
0
);
}
...
...
@@ -80,8 +99,12 @@ export class PrefixDetailsComponent implements OnInit {
this
.
currentprefix
=
data
;
console
.
log
(
data
)
this
.
simpleprefixControl
.
setValue
(
this
.
currentprefix
.
prefix
);
//make it null need solution
//this.subjectsControl.setValue(this.currentprefix.system_fun_item);
this
.
subjectsControl
.
setValue
(
this
.
currentprefix
.
system_fun_item
);
this
.
verbsControl
.
setValue
(
this
.
currentprefix
.
state_or_verb
);
this
.
objectsControl
.
setValue
(
this
.
currentprefix
.
item_function_flow_statevalue
);
this
.
logic_conControl
.
setValue
(
this
.
currentprefix
.
logic_connective
);
},
error
=>
{
...
...
@@ -91,11 +114,16 @@ export class PrefixDetailsComponent implements OnInit {
updatePrefix
():
void
{
this
.
currentprefix
.
prefix
=
this
.
simpleprefixControl
.
value
;
this
.
currentprefix
.
system_fun_item
=
this
.
subjectsControl
.
value
;
this
.
currentprefix
.
state_or_verb
=
this
.
verbsControl
.
value
;
this
.
currentprefix
.
item_function_flow_statevalue
=
this
.
objectsControl
.
value
;
this
.
currentprefix
.
logic_connective
=
this
.
logic_conControl
.
value
;
for
(
let
i
=
0
;
i
<
PrefixDetailsComponent
.
id
.
length
;
i
++
){
this
.
prefixService
.
update
(
this
.
route
.
snapshot
.
params
.
id
,
PrefixDetailsComponent
.
id
[
i
],
this
.
currentprefix
)
.
subscribe
(
response
=>
{
console
.
log
(
response
);
this
.
notifier
.
notify
(
"success"
,
JSON
.
stringify
(
"Prefix updated"
)
);
this
.
message
=
response
.
message
;
},
error
=>
{
...
...
@@ -119,7 +147,8 @@ export class PrefixDetailsComponent implements OnInit {
this
.
prefixService
.
getlogcon
()
.
subscribe
(
data
=>
{
this
.
logic_con
=
data
;
for
(
let
x
=
0
;
x
<
data
.
length
;
x
++
){
this
.
logic_con
.
push
(
data
[
x
][
1
]);}
},
error
=>
{
console
.
log
(
error
);
...
...
@@ -127,7 +156,8 @@ export class PrefixDetailsComponent implements OnInit {
this
.
prefixService
.
getverb
()
.
subscribe
(
data
=>
{
this
.
verbs
=
data
;
for
(
let
x
=
0
;
x
<
data
.
length
;
x
++
){
this
.
verbs
.
push
(
data
[
x
][
1
]);}
},
error
=>
{
console
.
log
(
error
);
...
...
@@ -137,7 +167,6 @@ export class PrefixDetailsComponent implements OnInit {
data
=>
{
for
(
let
x
=
0
;
x
<
data
.
length
;
x
++
){
this
.
subjects
.
push
(
data
[
x
][
1
]);}
//this.subjects = data;
},
error
=>
{
console
.
log
(
error
);
...
...
@@ -145,7 +174,8 @@ export class PrefixDetailsComponent implements OnInit {
this
.
prefixService
.
getoobject
()
.
subscribe
(
data
=>
{
this
.
objects
=
data
;
for
(
let
x
=
0
;
x
<
data
.
length
;
x
++
){
this
.
objects
.
push
(
data
[
x
][
1
]);}
},
error
=>
{
console
.
log
(
error
);
...
...
reqtool/ReqmanAngular11/src/app/components/prefix-list/prefix-list.component.html
View file @
7c90d07a
<p>
prefix-list works!
</p>
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