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

Feature request: Add getPhoneCodeForWilaya and getPhoneCodesForWilaya #19

Closed
Fcmam5 opened this issue Sep 28, 2020 · 7 comments · Fixed by #34 or #32
Closed

Feature request: Add getPhoneCodeForWilaya and getPhoneCodesForWilaya #19

Fcmam5 opened this issue Sep 28, 2020 · 7 comments · Fixed by #34 or #32

Comments

@Fcmam5
Copy link
Collaborator

Fcmam5 commented Sep 28, 2020

⚠️⚠️⚠️
This issue is for first-timers only, we'd like you to start your open-source journey from here 😄
⚠️⚠️⚠️

As a library consumer, I would like to have a method that returns phone codes for each wilaya.
One of the use cases for this feature is with forms; in order to have a better user experience, we would like to set the phone code initials when the user select their wilaya. For example: if I fill the address block and set my city to Oran (code: 31) I would like if the phone number block is set automatically to 041.

What we want to add:

  • A getPhoneCodeForWilaya function that takes one parameter (wilayaCode: number) and returns the first phone code (as a wilaya, like Algiers have two phone codes: 21, 23).
  • A getPhoneCodesForWilaya function that takes one parameter (wilayaCode: number) and returns an array of all phoneCodes of that wilaya.

NB:

  • Please read our contributing guidelines and our code of conduct
  • Comment here so we know that you're on it 🐝 .
  • Clone this repository, read the code and try to understand how we structured it.
  • Start hacking (PS: You can check the PRs we merged and see how our smart contributors added this kind of features)
  • Update documentation in the readme file
  • Ask for help, here or in Slack.

Happy Hacking !

@oussamabouchikhi
Copy link
Contributor

@Fcmam5 I will take getPhoneCodeForWilayaand getPhoneCodesForWilaya

@Fcmam5
Copy link
Collaborator Author

Fcmam5 commented Sep 28, 2020

@oussamabouchikhi please check #20 , let's keep this issue for first-timers 😄

@oussamabouchikhi
Copy link
Contributor

@oussamabouchikhi please check #20 , let's keep this issue for first-timers 😄

No problem

@joeylnguyen
Copy link
Contributor

Hi! May I contribute by taking on this issue?

@xxKeefer
Copy link
Contributor

I would love to have this for my first time, if you need someone to help i think i could do this

@Fcmam5
Copy link
Collaborator Author

Fcmam5 commented Sep 30, 2020

Hi! May I contribute by taking on this issue?

@joeylnguyen you got it! Happy Hacktober Hacking 🎉 !

@Fcmam5
Copy link
Collaborator Author

Fcmam5 commented Sep 30, 2020

I would love to have this for my first time, if you need someone to help i think i could do this

@xxKeefer you can take #24 😄

joeylnguyen added a commit to joeylnguyen/leblad that referenced this issue Oct 5, 2020
- Added getPhoneCodeForWilaya method that returns the first phone code from a list of phone codes
for a given wilaya

re dzcode-io#19
@Fcmam5 Fcmam5 closed this as completed in #34 Oct 5, 2020
@Fcmam5 Fcmam5 linked a pull request Oct 5, 2020 that will close this issue
4 tasks
@ZibanPirate ZibanPirate moved this to Backlog in DzCode i/o Feb 13, 2022
@ZibanPirate ZibanPirate moved this from Backlog to Released in DzCode i/o Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Released
4 participants