DanielHabenicht / ngx-vcard

MIT License
13 stars 14 forks source link

Address label not showing up properly #729

Open NithaDuff opened 1 year ago

NithaDuff commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: This is the address object that was created: const addr : Address = { label: 'Work' street: this.addUserForm. value.street, postalCode: this.addUserForm. value. ponum, locality: this.addUserForm. value. state, countryName: this .addUserForm. value. country };

This is string of the card generated using the vCardFormatter.getVCardAsString() method BEGIN:VCARD VERSION:3 FN;CHARSET=utf-8:test N;CHARSET=utf-8.;test.;. ORG;CHARSET=utf-8:ABC Co. ltd ADR;LABEL-"Work".,;The building, 5th Floor, PO Box 2345;Sample,;;Sample TEL;TYPE-Cell:444 TEL;TYPE-Work: EMAIL;TYPE=Work:e@u.com TITLE;CHARSET-utf-8:test URL:www.abc.com NOTE;CHARSET=utf-8:Some note END;VCARD

On converting this to a contact card: WhatsApp Image 2023-06-15 at 7 29 31 PM

Note the label of the address field which should've come as "Work" but this is displayed as "LABEL" If I explicitly add the character encoding to the address field, then we see this as "CHARSET".

Expected behavior The label value or type value given while creating the card class should be displayed as label in the generated vcard.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open at least 30 days with no activity. Comment or this issue will be closed in 14 days.