-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(backend): New Backend and authentication for Phonebook data. #7
Changes from all commits
1735af4
d465a35
fa89800
6dc3f03
114c3a0
0678278
9778930
84913d4
fcd985e
ec4d095
ce44d9e
f81c9f2
6505b90
2a3798e
2cb2513
eb13679
e3c49c8
e50e655
109efd8
aa4b1d1
d600ce2
bd6953f
fa6296a
0ed39a9
d7882fa
be0b9b4
f9f2940
fe0abd1
8c02b62
9296ab3
b1cc733
3b15c59
6ceb948
bafeea9
c6dde2b
cb1cdf1
9793eea
2961310
aa1b5bf
11fc4dd
00251ef
1658404
00e6499
a4643c2
33509a5
2412201
f551975
6f18d45
bd6a916
43ca3a3
43df910
cf2bddc
2a258a6
44ed826
d7529d8
9758776
4f6ca31
cd0aefa
6ffa60f
de232f0
e8cf437
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# TODO: #18 | ||
trigger: none | ||
pr: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- Phonebook.Source.PeopleSoft/** | ||
|
||
jobs: | ||
- job: build | ||
displayName: build docker image | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- bash: | | ||
docker build . | ||
workingDirectory: 'Phonebook.Source.PeopleSoft/' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# TODO: #18 | ||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- Phonebook.Source.PeopleSoft/ | ||
pr: none | ||
|
||
jobs: | ||
- job: build | ||
displayName: build docker image | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- bash: | | ||
docker build -t $dockerRepo:$tag . | ||
docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD | ||
docker push $dockerRepo:$tag | ||
workingDirectory: 'Phonebook.Source.PeopleSoft/' | ||
env: | ||
DOCKER_REGISTRY_PASSWORD: $(DOCKER_REGISTRY_PASSWORD) | ||
DOCKER_REGISTRY_USER: $(DOCKER_REGISTRY_USER) | ||
dockerRepo: tsystemsmms/phonebook-build | ||
tag: source-peoplesoft |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
// Use IntelliSense to find out which attributes exist for C# debugging | ||
// Use hover for the description of the existing attributes | ||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": ".NET Core Launch (web)", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
// If you have changed target frameworks, make sure to update the program path. | ||
"program": "${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/bin/Debug/netcoreapp2.2/Phonebook.Source.PeopleSoft.dll", | ||
"args": [], | ||
"cwd": "${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft", | ||
"stopAtEntry": false, | ||
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser | ||
"serverReadyAction": { | ||
"action": "openExternally", | ||
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)" | ||
}, | ||
"env": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"sourceFileMap": { | ||
"/Views": "${workspaceFolder}/Views" | ||
} | ||
}, | ||
{ | ||
"name": ".NET Core Attach", | ||
"type": "coreclr", | ||
"request": "attach", | ||
"processId": "${command:pickProcess}" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj" | ||
], | ||
"problemMatcher": "$tsc" | ||
}, | ||
{ | ||
"label": "publish", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"publish", | ||
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj" | ||
], | ||
"problemMatcher": "$tsc" | ||
}, | ||
{ | ||
"label": "watch", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"watch", | ||
"run", | ||
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj" | ||
], | ||
"problemMatcher": "$tsc" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ export class RoomDetailComponent implements OnInit { | |
this.room = this.node.data as Room; | ||
} | ||
this.personService | ||
.getPersonsByRoom(RoomHelpers.getParamsAsArray(params, ['cityId', 'buildingId', 'floorId', 'roomId'])) | ||
.getPersonsByRoom(RoomHelpers.getParamsAsArray(params, ['roomId'])[0]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Das funktioniert nicht, es gibt Räume die die gleiche RoomId haben, oder mittlerweile nicht mehr? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test before close. The room Id is now the DatabaseId, thats mean it is unique. |
||
.subscribe(person => { | ||
this.persons = person; | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,10 @@ export class Helpers { | |
* Removes Accents from the string. | ||
* @param str Any String | ||
*/ | ||
public static removeAccents(str: string): string { | ||
public static removeAccents(str: string | null): string { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. das verursacht evtl. unbeabsichtigtes fehlverhalten, da Ich hoffe du hast es die nullbaren Dinge in den Models angepasst? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. set all model properties to nullable. |
||
if(str === null){ | ||
return ''; | ||
} | ||
return str.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ export class PersonService { | |
item.Contacts.Fax, | ||
item.Contacts.Email, | ||
item.Contacts.Phone, | ||
new Messenger(item.Contacts.Messenger.Text, item.Contacts.Messenger.State) | ||
new Messenger("", null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Da steht nie etwas drin? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ja!!!!!! bitte! |
||
), | ||
new Location( | ||
item.Location.City, | ||
|
@@ -74,15 +74,16 @@ export class PersonService { | |
return this.allPersonObservable; | ||
} | ||
|
||
const observable = this.http.get<Person[]>('/api/persons').pipe( | ||
map(personArray => { | ||
return TableLogic.sort(this.generateRealPersonArray(personArray), { | ||
column: ColumnDefinitions.fullname, | ||
direction: PhonebookSortDirection.asc | ||
}); | ||
}), | ||
publishReplay() | ||
); | ||
const observable = this.http.get<Person[]>('/api/people') | ||
.pipe( | ||
map(personArray => { | ||
return TableLogic.sort(this.generateRealPersonArray(personArray), { | ||
column: ColumnDefinitions.fullname, | ||
direction: PhonebookSortDirection.asc | ||
}); | ||
}), | ||
publishReplay() | ||
); | ||
(observable as ConnectableObservable<Person[]>).connect(); | ||
this.allPersonObservable = observable; | ||
return this.allPersonObservable; | ||
|
@@ -102,15 +103,12 @@ export class PersonService { | |
); | ||
} | ||
|
||
public getPersonsByRoom(positionArray: string[]): Observable<Person[]> { | ||
public getPersonsByRoom(roomId: string): Observable<Person[]> { | ||
paule96 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return this.getAll().pipe( | ||
map(personArray => { | ||
return personArray.filter(x => { | ||
return ( | ||
x.Location.RoomCollection[0].Place === positionArray[0] && | ||
x.Location.RoomCollection[0].Building === positionArray[1] && | ||
x.Location.RoomCollection[0].Floor.toString() === positionArray[2] && | ||
x.Location.RoomCollection[0].Number === positionArray[3] | ||
x.Location.RoomCollection.some( x=> x.Number == roomId) | ||
); | ||
}); | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.