Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Now a user cannot have more than 100 #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

InalDJ
Copy link

@InalDJ InalDJ commented Dec 12, 2020

records in the database

InalDjasheev added 2 commits December 12, 2020 12:52
records in the database
Now a user cannot have more than 100 records in the database;
Copy link
Member

@Max-Levitskiy Max-Levitskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to add disable on add button and show message that user can't have more than 100 records.
I think we can add method getDataLimit to the service instead of hardcode it.

getCount(): Promise<any> {
return this.httpClient.get<any>(environment.backendUrl + '/data/count').toPromise();
}

add(data: Data): Promise<any> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be number here but not any :)

@@ -12,6 +12,7 @@ import {isNameExists} from '../../_validators/uniq-name.validator';
styleUrls: ['./add.component.scss']
})
export class AddComponent implements OnInit {
dataCount: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number, not string

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants