Skip to content

Commit

Permalink
[Release] v0.21.4 (#1008)
Browse files Browse the repository at this point in the history
* GCW-3220 display validation error for item-valuation input

* GCW-3220 updated valuation validation

* 🐛 Fix permisssion related bug for charity position

* 📝 Remove debugger

* ⬆️ Update fastlane

* updated fastlane

* GCW-3504-Adding precision for valuation till 2 digit

* Remove commented code

* Revert old changes

* increase calendar overlay height

* added findRecord instead of loadIfAbsent

* Add districts in preload data

* Bundle update

* ⬆️ Bump version

Co-authored-by: swatijadhav <[email protected]>
Co-authored-by: shreyas098 <[email protected]>
Co-authored-by: abulsayyad123 <[email protected]>
Co-authored-by: AbulAsar Sayyad <[email protected]>
  • Loading branch information
5 people authored Mar 31, 2021
1 parent 28fede1 commit f6e6d65
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 99 deletions.
34 changes: 17 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ GEM
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.429.0)
aws-sdk-core (3.112.0)
aws-eventstream (1.1.1)
aws-partitions (1.435.0)
aws-sdk-core (3.113.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.42.0)
aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.89.0)
aws-sdk-s3 (1.93.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-sigv4 (1.2.3)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
capistrano (3.4.0)
Expand Down Expand Up @@ -97,7 +97,7 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.3)
fastlane (2.176.0)
fastlane (2.179.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -146,7 +146,7 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-apis-core (0.2.1)
google-apis-core (0.3.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
Expand All @@ -156,25 +156,25 @@ GEM
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.1.0)
google-apis-iamcredentials_v1 (0.2.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.2.0)
google-apis-storage_v1 (0.3.0)
google-apis-core (~> 0.1)
google-cloud-core (1.5.0)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.4.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.30.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.0)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.15.1)
googleauth (0.16.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -192,7 +192,7 @@ GEM
jwt (2.2.2)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.0.2)
mini_mime (1.0.3)
mini_portile2 (2.4.0)
minitest (5.14.2)
molinillo (0.6.6)
Expand Down Expand Up @@ -222,7 +222,7 @@ GEM
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.1)
signet (0.15.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
Expand Down
18 changes: 18 additions & 0 deletions app/controllers/items/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,24 @@ export default GoodcityController.extend(
}, ERROR_STRATEGIES.MODAL);
},

itemValueHkDollar: Ember.computed(
"item",
"valueHkDollar",
"item.isBoxOrPallet",
function() {
if (this.get("item.isBoxOrPallet")) {
return false;
}

return this.get("valueHkDollar");
}
),

isInvalidValuation: Ember.computed("itemValueHkDollar", function() {
const value = this.get("itemValueHkDollar");
return value === "" || value === null;
}),

actions: {
updatePackage(field, value) {
this.runTask(
Expand Down
8 changes: 7 additions & 1 deletion app/controllers/users/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import OrganisationMixin from "stock/mixins/organisation";
export default Ember.Controller.extend(OrganisationMixin, AsyncMixin, {
organisationsUserService: Ember.inject.service(),
userService: Ember.inject.service(),

session: Ember.inject.service(),
user: Ember.computed.alias("model"),
disableUserPopupVisible: false,
enableUserPopupVisible: false,
Expand All @@ -25,6 +25,12 @@ export default Ember.Controller.extend(OrganisationMixin, AsyncMixin, {
"isDisabledUser"
),

canManageCharityPosition: Ember.computed(function() {
return this.get("session")
.get("currentUser")
.get("canManageOrganisationsUsers");
}),

userOrganisationDetails: Ember.computed(
"model",
"model.organisationsUsers.[]",
Expand Down
8 changes: 8 additions & 0 deletions app/models/user_profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export default Addressable.extend({
);
}),

canManageOrganisationsUsers: Ember.computed("roles", function() {
const roles = this.get("roles");
return roles.find(
r =>
r.get("permissionNames").indexOf("can_manage_organisations_users") >= 0
);
}),

canDisableUsers: Ember.computed("roles", function() {
const roles = this.get("roles");
return roles.find(
Expand Down
2 changes: 1 addition & 1 deletion app/routes/orders/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default AuthorizeRoute.extend({
currentRouteName: null,

model({ order_id }) {
return this.loadIfAbsent("designation", order_id);
return this.get("store").findRecord("designation", order_id);
},

async afterModel() {
Expand Down
7 changes: 1 addition & 6 deletions app/routes/orders/order_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ export default detail.extend({
loadLookups() {
// Load dependent lookup tables
return Ember.RSVP.all(
[
"district",
"gogovan_transport",
"booking_type",
"process_checklist"
].map(model =>
["gogovan_transport", "booking_type", "process_checklist"].map(model =>
!this.store.peekAll(model).get("length")
? this.store.findAll(model)
: this.store.peekAll(model)
Expand Down
17 changes: 11 additions & 6 deletions app/styles/templates/items/_detail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -745,25 +745,29 @@
}

.donation-input-error,
.description-error {
.item-input-error {
padding-left: 0.2rem;
color: white;
margin-left: -0.2rem;
margin-top: -1rem;
background-color: #f46769;
width: 100%;

}

.description-error {
margin: -1.3rem 0 0.4rem 0.1rem!important;
width: 100% !important;
margin: -1.3rem 0 1rem 0.1rem!important;
width: 99% !important;
display: block !important;
}

.item-hk-value-error {
margin: -1rem 0 1rem 0rem !important;
padding: 0 0.2rem;
width: 65%;

.form__control.form__control--error .description-error {
display: block !important;
@media #{$small-only} {
width: 90%;
}
}

.numeric-input,
Expand Down Expand Up @@ -1054,6 +1058,7 @@
font-size: 1rem !important;
padding: 0.5rem !important;
display: inline-block !important;

@media #{$small-only} {
width: 90% !important;
font-size: 0.7rem !important;
Expand Down
4 changes: 4 additions & 0 deletions app/styles/templates/orders/_detail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@
color: rgba(0, 0, 0, 0.75);
}
}

.reschedule-popup .picker__frame {
height: 100vh;
}
}

.order_item_list_tabs{
Expand Down
15 changes: 11 additions & 4 deletions app/templates/items/detail/tabs/_item_detail.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
data-autoresize=true value=item.notesZhTw class="description-textarea-withbg" pattern=".*\S.*"}}
{{/if}}
{{#unless item.notes}}
<div class='description-error'>
<div class='description-error item-input-error'>
{{t 'item_details.validation_errors.description'}}
</div>
{{/unless}}
Expand Down Expand Up @@ -101,17 +101,24 @@
</div>
<div class="row">
<div class="columns large-3 small-3">{{t 'items.value'}} </div>
<div class="columns large-3 small-3 ">
<div class="columns large-5 small-5 ">
{{numeric-inline-input
name="value_hk_dollar"
value=valueHkDollar
maxlength="6"
maxlength="10"
acceptFloat=true
class='numeric-input valuation-input'
onSettingInput=(action 'updatePackage')
}}

{{#if isInvalidValuation}}
<div class='item-hk-value-error item-input-error'>
{{t 'items.new.validation_errors.blank_valuation'}}
</div>
{{/if}}
</div>
<div class="columns large-6 small-6">

<div class="columns large-4 small-4">
{{#if (is-not-equal valueHkDollar defaultValueHkDollar)}}
<span {{action "applyDefaultItemValuation"}} class="default-content">
{{t "items.apply_default"}} {{defaultValueHkDollar}}
Expand Down
8 changes: 4 additions & 4 deletions app/templates/items/new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<div class="option_menu" {{action "openImageOverlay"}}>
{{t "camera.take"}}
</div>
{{/unless}}
{{/unless}}
</div>
{{/dropDown.dropDownBody}}
{{/composable-drop-down}}
Expand Down Expand Up @@ -158,11 +158,11 @@
<div class="small-3 columns">
{{t "items.value"}}
</div>
<div class="columns small-3">
{{numeric-input acceptFloat=true required='true' acceptZeroValue=true value=valueHkDollar name="value_hk" maxlength="6"
<div class="columns small-4">
{{numeric-input acceptFloat=true required='true' acceptZeroValue=true value=valueHkDollar name="value_hk" maxlength="10"
pattern="\d+\.?\d*"}}
</div>
<div class="columns small-6 apply-default">
<div class="columns small-5 apply-default">
{{#if canApplyDefaultValuation}}
<a href="#" {{action 'setDefaultItemValuation'}} class="default-content">{{t 'items.apply_default'}}
{{defaultValueHkDollar}}</a>
Expand Down
Loading

0 comments on commit f6e6d65

Please sign in to comment.