Skip to content

Commit

Permalink
Merge pull request #503 from iShafayet/sprint-0.1.1
Browse files Browse the repository at this point in the history
Sprint 0.1.1
  • Loading branch information
iLGunners authored Nov 15, 2018
2 parents f802b4c + 544bd41 commit 4b01874
Show file tree
Hide file tree
Showing 70 changed files with 756 additions and 129 deletions.
21 changes: 17 additions & 4 deletions client/src/lang-bn-bd.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
"moduleDescriptionLineTwo": "লিপি তে আরো ফীচার এবং কার্যকারিতা যোগ করতে আমাদের সাথে যোগাযোগ করুন এই নম্বরে +880 1770 947908 অথবা care@anvil.live এ মেইল লিখুন ",
"productModule": "প্রোডাক্ট মডিউল",
"serviceModule": "সেবা মডিউল",
"gymModule": "জিমনেসিয়াম মডিউল"
"gymModule": "জিমনেসিয়াম মডিউল",
"retail": "পণ্য বিক্রয়",
"service": "সেবা বিক্রয়",
"both": "উভয়"
},
"login": {
"forgotPassword": "পাসওয়ার্ড ভুলে গেছেন?",
Expand All @@ -108,6 +111,12 @@
"passwordInput": "আপনার সর্বনিম্ন ৮ অক্ষরের একটি পাসওয়ার্ড দিন",
"passwordInputError": "সর্বনিম্ন ৮ অক্ষরের একটি পাসওয়ার্ড দিন",
"alreadyHaveAccount": "আপনার কি ইতিমধ্যে একটি একাউন্ট আছে?",
"tocNotRead": "আপনি নিবন্ধন করার আগে আপনাকে অবশ্যই শর্তাবলী পড়তে হবে।",
"tocNotAgreed": "নিবন্ধন করার আগে আপনাকে অবশ্যই শর্তাবলীতে সম্মত হতে হবে।",
"tocLinkPart1": "আপনি নিবন্ধন করার আগে ",
"tocLinkPart2": " শর্তাবলী ",
"tocLinkPart3": " অনুগ্রহ করে পড়ুন।",
"tocCheckbox": "আমি উপরের শর্তাবলী পড়ে এবং বুঝে সম্মতি দিচ্ছি।",
"nowAUserOfTorque": "আপনি এখন লিপির একটি ব্যবহারকারী। আপনি এখন লগ ইন করতে পারেন।"
},
"sidebar": {
Expand Down Expand Up @@ -184,6 +193,7 @@
"organization": {
"addOrganizationTitle": "সংস্থা তৈরি করুন",
"isNotOneOutletOrg": "এই সংস্থার একের বেশি দোকান আছে।",
"industryCategory": "সংস্থার শিল্পের ধরণ",
"nameOfYourOrganization": "আপনার সংস্থার নাম",
"pleaseEnterAValidName": "সঠিক নাম লিখুন",
"emailInput": "আপনার ইমেইল (ঐচ্ছিক)",
Expand Down Expand Up @@ -701,8 +711,9 @@
"phoneNowVerified": "আপনার ফোন যাচাই করা হয়েছে।",
"phoneCouldNotBeVerified": "আপনার ফোন যাচাই করা যায়নি। নিশ্চিতকরণ যাচাই কোডটি সঠিক কিনা দেখুন।",
"verifyPhoneNumberHeader": "ফোন নম্বর যাচাইকরণ",
"verificationTokenInput": "আপনার ফোনে পাঠানো যাচাইকরণ টোকেনটি লিখুন।",
"verificationTokenInputError": "আপনার ফোনে পাঠানো যাচাইকরণ টোকেনটি লিখুন।",
"verificationToken": "আপনার ফোনে পাঠানো যাচাইকরণ টোকেনটি লিখুন।",
"verificationTokenInput": "যাচাইকরণ টোকেনটি।",
"verificationTokenInputError": "সঠিক যাচাইকরণ টোকেনটি।",
"resendSms": "এসএমএস আবার পাঠান",
"verify": "যাচাই করুন",
"dontHaveAccount": "অ্যাকাউন্ট নেই?"
Expand All @@ -721,6 +732,7 @@
"sellingPrice": "বিক্রয় মূল্য",
"acquiredOn": "খরিদ হয়েছে",
"addedOn": "যুক্ত হয়েছে",
"addToInventoryHelp": "পণ্য তালিকায় যোগ করা নতুন পণ্য বিদ্যমান একই পণ্যের গণনা বৃদ্ধি করবে না, পরিবর্তে পণ্যের একটি নতুন ব্যাচ হিসেবে গণনা হবে। আজকের তারিখ নতুন ব্যাচের পণ্যগুলির 'যুক্ত তারিখ' হিসাবে ব্যবহার করা হবে।",
"transferInventoryHelp": "একটি পণ্য তালিকা থেকে অন্য পণ্য তালিকায় পণ্য সরাতে পারেন। পণ্য বাছাই শুরু করতে নিচে ক্লিক করুন।",
"selectProductsToTransfer": "সরানোর জন্য পণ্য বাছাই শুরু করুন",
"stopSelectingProductsToTransfer": "সরানোর জন্য পণ্য বাছাই বন্ধ করুন"
Expand Down Expand Up @@ -815,7 +827,8 @@
"expiringDatetime": "মেয়াদ",
"customer": "ক্রেতা",

"serviceBlueprint": "সেবার সদস্যপদ"
"serviceBlueprint": "সেবা",
"assignedEmployee": "দায়িত্বে"
},
"serviceBlueprintSelector": {
"serviceBlueprintNameOrPhoneInput": "নাম দিয়ে খুজুন",
Expand Down
23 changes: 19 additions & 4 deletions client/src/lang-en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
"moduleDescriptionLineTwo": "To add more features to Lipi, contact us at +880 1770 947908 or mail us at care@anvil.live",
"productModule": "Product Module",
"serviceModule": "Service Module",
"gymModule": "Gym Module"
"gymModule": "Gym Module",
"retail": "Retail",
"service": "Service",
"both": "Both"
},
"login": {
"forgotPassword": "Forgot your Password?",
Expand All @@ -108,6 +111,12 @@
"passwordInput": "A minimum 8 digit password",
"passwordInputError": "Enter a password at least 8 characters long.",
"alreadyHaveAccount": "Already have an account?",
"tocNotRead": "You must read the Terms and Conditions before you proceed.",
"tocNotAgreed": "You must agree to the Terms and Conditions before you proceed.",
"tocLinkPart1": "Please read the ",
"tocLinkPart2": "The Terms and Conditions",
"tocLinkPart3": " before you register.",
"tocCheckbox": "I have read, understood and agree to the Terms and Conditions above.",
"nowAUserOfTorque": "You are now a user of Torque. You now may log in."
},
"sidebar": {
Expand Down Expand Up @@ -182,6 +191,9 @@
"organization": {
"addOrganizationTitle": "Add Organization",
"isNotOneOutletOrg": "This organization has more than one outlets.",

"industryCategory": "Industry Category of Organization",

"nameOfYourOrganization": "Name of your Organization",
"pleaseEnterAValidName": "Enter a valid name.",
"emailInput": "Your email address (Optional)",
Expand Down Expand Up @@ -700,8 +712,9 @@
"phoneNowVerified": "Your phone is now verified.",
"phoneCouldNotBeVerified": "Your phone could not be verified. Make sure the verification code is correct.",
"verifyPhoneNumberHeader": "VERIFY PHONE NUMBER",
"verificationTokenInput": "Enter the verification token we sent to your phone.",
"verificationTokenInputError": "Enter the verification token we sent to your phone.",
"verificationToken": "Enter the verification token we sent to your phone.",
"verificationTokenInput": "Verification token.",
"verificationTokenInputError": "Enter valid verification token.",
"resendSms": "RESEND SMS",
"verify": "Verify",
"dontHaveAccount": "Don't have an account?"
Expand All @@ -720,6 +733,7 @@
"sellingPrice": "Selling Price",
"acquiredOn": "Acquired On",
"addedOn": "Added On",
"addToInventoryHelp": "Products added to Inventory will not increase the count of existing similar products, instead will be a new Batch. Today's date will be used as 'Added-On date' for the new Batch of products.",
"transferInventoryHelp": "Product can be transfered between inventories. You can start selecting product(s) to be transfered by clicking below.",
"selectProductsToTransfer": "Start Selecting Products to Transfer",
"stopSelectingProductsToTransfer": "Stop Selecting Products to Transfer"
Expand Down Expand Up @@ -814,7 +828,8 @@
"expiringDatetime": "Expiry",
"customer": "Customer",

"serviceBlueprint": "Service blueprint"
"serviceBlueprint": "Service",
"assignedEmployee": "Assigned"
},
"serviceBlueprintSelector": {
"serviceBlueprintNameOrPhoneInput": "By name.",
Expand Down
45 changes: 39 additions & 6 deletions client/src/page-add-organization.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tab.html">
<link rel="import" href="../bower_components/paper-checkbox/paper-checkbox.html">

<link rel="import" href="../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../bower_components/paper-listbox/paper-listbox.html">

<link rel="import" href="../bower_components/iron-form/iron-form.html">

<link rel="import" href="../bower_components/baselib/baselib.html">
Expand All @@ -22,6 +26,11 @@
<dom-module id="page-add-organization">
<template>
<style include="shared-styles">

.full-width-paper-dropdown {
width: 100%;
}

</style>

<elem-not-ready is-ready="[[isReady]]"></elem-not-ready>
Expand All @@ -35,6 +44,15 @@
<paper-input class="addOrganizationForm--phone" value="{{addOrganizationForm.phone}}" required minlength="11" maxlength="15" error-message=[[verses.organization.phoneInputError]] label=[[verses.organization.phoneInput]]></paper-input>
<paper-input class="addOrganizationForm--email" value="{{addOrganizationForm.email}}" pattern="^.+@.+\..+$" minlength="0" error-message=[[verses.organization.emailInputError]] label=[[verses.organization.emailInput]]></paper-input>
<paper-textarea class="addOrganizationForm--primaryBusinessAddress" value="{{addOrganizationForm.primaryBusinessAddress}}" required minlength="8" error-message=[[verses.organization.primaryBusinessAddressInputError]] label=[[verses.organization.primaryBusinessAddressInput]] rows="4"></paper-textarea>

<paper-dropdown-menu class="full-width-paper-dropdown" label="[[verses.organization.industryCategory]]" class="mr-4">
<paper-listbox slot="dropdown-content" selected="{{addOrganizationForm.industryCategory}}" attr-for-selected="name">
<paper-item name="retail">[[verses.general.retail]]</paper-item>
<paper-item name="service">[[verses.general.service]]</paper-item>
<paper-item name="both">[[verses.general.both]]</paper-item>
</paper-listbox>
</paper-dropdown-menu>

<paper-checkbox class="addOrganizationForm--isNotOneOutletOrg" checked="{{addOrganizationForm.isNotOneOutletOrg}}">[[verses.organization.isNotOneOutletOrg]]</paper-checkbox>
<div class="horizontal layout button-row end">
<div class="flex"></div>
Expand Down Expand Up @@ -63,15 +81,17 @@
phone: '01700000011',
email: 'johndoe@johnsapparel.com',
primaryBusinessAddress: 'Road 50\nThis Town',
isNotOneOutletOrg: false
isNotOneOutletOrg: false,
industryCategory: 'both'
};
} else {
return {
name: '',
phone: '',
email: '',
primaryBusinessAddress: '',
isNotOneOutletOrg: false
isNotOneOutletOrg: false,
industryCategory: 'both'
};
}
}
Expand Down Expand Up @@ -113,10 +133,23 @@

// region: addOrganization =================================

_processUserAddOrganization({ name, phone, email, primaryBusinessAddress, isNotOneOutletOrg }) {
_processUserAddOrganization({ name, phone, email, primaryBusinessAddress, isNotOneOutletOrg, industryCategory }) {
email = email.toLowerCase();

let data = { name, phone, email, primaryBusinessAddress };
let activeModuleCodeList = [];
if (industryCategory === 'retail') {
activeModuleCodeList = ['MOD_PRODUCT'];
}

if (industryCategory === 'service') {
activeModuleCodeList = ['MOD_SERVICE'];
}

if (industryCategory === 'both') {
activeModuleCodeList = ['MOD_PRODUCT', 'MOD_SERVICE'];
}

let data = { name, phone, email, primaryBusinessAddress, activeModuleCodeList };

this.app.callAddOrganizationApi(data, (err, response) => {
if (err) return;
Expand All @@ -140,8 +173,8 @@



let { name, phone, email, primaryBusinessAddress, isNotOneOutletOrg } = this.addOrganizationForm;
this._processUserAddOrganization({ name, phone, email, primaryBusinessAddress, isNotOneOutletOrg });
let { name, phone, email, primaryBusinessAddress, isNotOneOutletOrg, industryCategory } = this.addOrganizationForm;
this._processUserAddOrganization({ name, phone, email, primaryBusinessAddress, isNotOneOutletOrg, industryCategory });
}

// region: misc =================================
Expand Down
8 changes: 7 additions & 1 deletion client/src/page-manage-sales.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@
</div>
<div class="description-time">[[$mkDate(sale.createdDatetimeStamp, 'hh:mmtt dd-MM-yyyy')]]</div>
<div class="description">[[verses.sales.billed]]: [[$round(sale.payment.totalBilled)]] [[app.settings.monetaryUnit]], [[verses.sales.paid]]: [[$round(sale.payment.totalPaidAmount)]] [[app.settings.monetaryUnit]]</div>
<div class="description">[[sale.productList.length]] [[verses.sales.products]]</div>

<template is="dom-if" if="{{sale.productList.length}}">
<span class="description">[[sale.productList.length]] [[verses.sales.products]]</span>
</template>
<template is="dom-if" if="{{sale.serviceList.length}}">
<span class="description">[[sale.serviceList.length]] [[verses.sales.services]]</span>
</template>

</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions client/src/page-manage-service-membership.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
<div class="service-description">[[verses.serviceMembership.serviceBlueprint]]:
[[serviceMembership.serviceBlueprintDetails.name]]</div>

<template is="dom-if" if="[[serviceMembership.assignedEmploymentId]]">
<div class="service-description">[[verses.serviceMembership.assignedEmployee]]:
[[serviceMembership.assignedEmployeeDetails.fullName]], [[serviceMembership.assignedEmployeeDetails.phone]]</div>
</template>

<div class$="expiring-datetime-container [[$serviceMembershipExpiryStatus(serviceMembership.expiringDatetimeStamp)]]">
[[verses.serviceMembership.expiringDatetime]]: [[$mkDate(serviceMembership.expiringDatetimeStamp,
'hh:mmtt dd-MMM-yyyy')]]
Expand Down
8 changes: 4 additions & 4 deletions client/src/page-pos.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@
<template is="dom-if" if="{{service.isEmployeeAssignable}}" >

<template is="dom-if" if="{{service.assignedEmploymentId}}">
<div class="employee-icon-container-active">
<iron-icon icon="icons:account-circle" class="assign-icon" on-tap="assignEmployeeTapped"></iron-icon>[[verses.pos.assignedEmployee]]
<div class="employee-icon-container-active" on-tap="assignEmployeeTapped">
<iron-icon icon="icons:account-circle" class="assign-icon"></iron-icon>[[verses.pos.assignedEmployee]]
</div>
</template>

<template is="dom-if" if="{{!service.assignedEmploymentId}}">
<div class="employee-icon-container">
<iron-icon icon="icons:account-circle" class="assign-icon" on-tap="assignEmployeeTapped"></iron-icon>[[verses.pos.assignEmployee]]
<div class="employee-icon-container" on-tap="assignEmployeeTapped">
<iron-icon icon="icons:account-circle" class="assign-icon"></iron-icon>[[verses.pos.assignEmployee]]
</div>
</template>

Expand Down
11 changes: 9 additions & 2 deletions client/src/page-print-sales-receipt.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,15 @@

_printAndGoBack() {
window.setTimeout(() => {

const threshold = 300;
let then = Date.now();
window.print();
window.history.back();
let now = Date.now();
if (now - then > threshold){
window.history.back();
}

}, 100);
}

Expand Down Expand Up @@ -429,7 +436,7 @@
}

$calculateIndividualServicePrice(service) {
let { salePrice } = service;
let { salePrice } = service;
return this.$round(salePrice);
}

Expand Down
Loading

0 comments on commit 4b01874

Please sign in to comment.