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

Yasser branch #12

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Yasser branch #12

wants to merge 18 commits into from

Conversation

YasserSh
Copy link

No description provided.

Copy link
Contributor

@VasoOppelt VasoOppelt left a comment

Choose a reason for hiding this comment

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

Hi, i just wrote some comments for you. Johan will give you more info when you two meet online.

<span class="input-group-text">
<i class="bi bi-envelope"></i>
</span>
{{ form_widget(form.email, { attr: { class: 'form-control' } }) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Errors from backend are not showing, you can place form_errors here

</div>
<hr class="my-4">

{#Home Address Section#}
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicit code blocks. You can create new component and include it here 3 times with different parameters

{% endif %}
<div class="row mb-4 mt-5 justify-content-center">
<div class="col-4 text-center d-grid gap-2">
<a href="/" class="btn btn-secondary">Back</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

use path function for links

@@ -0,0 +1,71 @@
<script lang="ts">
export let addressFields;
Copy link
Contributor

Choose a reason for hiding this comment

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

no type here

@@ -0,0 +1,66 @@
<script lang="ts">
export let basicFields;
Copy link
Contributor

Choose a reason for hiding this comment

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

types will help you with autocompletion and with maintaining code


let customer = undefined as undefined | CustomerType;

const navTabs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

no type here

</div>
</div>

{#if customer.addressHome}
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicit blocks of code. Use component instead

let billingCountryRequired = false;

//update required status based on other fields
$: homeCountryRequired =
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicit functionality

};

//prefill address fields if they exist
if (customer.addressHome) {
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicit functionality

</div>

<!-- Home Address -->
<div
Copy link
Contributor

Choose a reason for hiding this comment

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

can be loaded automaticaly based on navTabs variable

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.

2 participants