Skip to content
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

Added searchable filters in Ho_dan page #212

Merged

Conversation

dshongphuc
Copy link
Contributor

Mình thêm tính năng Cho phép gõ tên trong phần lọc tỉnh/huyện/xã #209 trong page Hộ dân.
Mình test khá kĩ rồi nhưng nếu có vấn đề gì vui lòng cho mình biết để mình fix nhé reviewers. :)

Copy link
Collaborator

@mihnsen mihnsen left a comment

Choose a reason for hiding this comment

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

@dshongphuc Thanks for your hard work. I can see it in my local. However, there are few points we need to change before I can approve your PR:

  • Code convention: CSS and JS - please take a look at my comments.
  • We should have no search when select "status"
  • Package-lock.json is totally changed, can you validate it, please?
  • Translate choices.js
    • No result found => Không tìm thấy kết quả

.env.sample Outdated
@@ -1,4 +1,5 @@
DB_NAME=cuuhomientrung
DB_USER=postgres
Copy link
Collaborator

Choose a reason for hiding this comment

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

@dshongphuc I don't see any reason we have to include the change of configuration example in this pull request. Can you exclude it?

.form-control {
padding-left: .25rem;
padding-right: .25rem;
margin-bottom: .25rem;
}

.choices{
position: relative;
&:focus{ outline: 1px solid #9fcfff!important; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

@dshongphuc Can you break it down to a new line here please? It should be

      &:focus { 
            outline: 1px solid #9fcfff!important; 
      }

.form-control {
padding-left: .25rem;
padding-right: .25rem;
margin-bottom: .25rem;
}

.choices{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a space before curlybraces please? it should be .choices {

.choices{
position: relative;
&:focus{ outline: 1px solid #9fcfff!important; }
&.is-focused{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add space

&:focus{ outline: 1px solid #9fcfff!important; }
&.is-focused{
outline: none;
.choices__inner{ border-radius: 0.25rem 0.25rem 0 0; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Break new line

@@ -99,12 +99,96 @@
}

.citizen-filter {
&>div{
Copy link
Collaborator

Choose a reason for hiding this comment

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

This css is for spacing on mobile I guess
image
Can we change it by adding mb-2 class to each column inside .citizen-filter?

let selectTinh = new Choices(document.getElementById('select-tinh'));
let selectHuyen = new Choices(document.getElementById('select-huyen'));
let selectXa = new Choices(document.getElementById('select-xa'));
let selectStatus = new Choices(document.getElementById('select-status'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the issue, there is no requirement to add a search to select status and just a few items, we don't need search for status.


// Then update the choices:
selectHuyen.clearChoices()
selectHuyen.setChoices(listHuyen)
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe there is a Tab here, can you change it to space?

border:none;
border-bottom: 1px solid #ced4da;
padding: 0.25rem 0.4rem;
&:focus{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add space

@mihnsen
Copy link
Collaborator

mihnsen commented Nov 3, 2020

@dshongphuc anh mới hỏi bên cái issue related đến cái PR này: #209
Thì các bạn đã định làm lại trang này theo cái issue: #208
Em follow cái issue đó trước khi cập nhật PR không lại mất công nhé @dshongphuc

@dshongphuc
Copy link
Contributor Author

Hi anh @mihnsen,
Em đã fix các lỗi trong PR tối hôm qua :

  • Code convention: CSS and JS
  • We should have no search when select "status"
  • Translate choices.js : No result found => Không tìm thấy kết quả

Tuy nhiên, chỉ có cái vấn đề với Package-lock.json là em chưa rõ lắm, lúc em cài package mới hoặc install các packages hiện có trong package.json, nó luôn báo : this version of npm is compatible with lockfileversion@1, but package-lock.json was generated for lockfileversion@2 rồi sau đó generate ra file package-lock mới luôn. Anh có cách nào giải quyết vụ này ko anh? Hoặc anh thử chạy npm install bên máy anh xem có gặp vấn đề giống em ko? (em chạy bên trong docker luôn)

Thanks anh nhiều !

@mihnsen
Copy link
Collaborator

mihnsen commented Nov 5, 2020

@dshongphuc anh thấy các bạn định thay đổi model hộ dân. em xem thêm chi tiết ở đây nhé: #208

@dshongphuc
Copy link
Contributor Author

hi anh @mihnsen , em đã thảo luận với bạn @kc97ble mấy hôm trước và bạn ấy đã confirm là issue này ko liên quan đến #208 ạ : #209 (comment)

@kc97ble
Copy link
Collaborator

kc97ble commented Nov 6, 2020

@mihnsen anh có thể review lại giúp em cái PR này không ạ? Nếu ổn thì ta có thể merge.

@kc97ble kc97ble requested a review from mihnsen November 6, 2020 06:53
@DungDA DungDA merged commit a141529 into Cuuhomientrung:develop Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants