Skip to content

Commit f6e6d65

Browse files
bharat619swatijadhavshreyas098abulsayyad123abulsayyad123
authored
[Release] v0.21.4 (#1008)
* 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]>
1 parent 28fede1 commit f6e6d65

File tree

13 files changed

+169
-99
lines changed

13 files changed

+169
-99
lines changed

Gemfile.lock

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ GEM
1414
json (>= 1.5.1)
1515
artifactory (3.0.15)
1616
atomos (0.1.3)
17-
aws-eventstream (1.1.0)
18-
aws-partitions (1.429.0)
19-
aws-sdk-core (3.112.0)
17+
aws-eventstream (1.1.1)
18+
aws-partitions (1.435.0)
19+
aws-sdk-core (3.113.0)
2020
aws-eventstream (~> 1, >= 1.0.2)
2121
aws-partitions (~> 1, >= 1.239.0)
2222
aws-sigv4 (~> 1.1)
2323
jmespath (~> 1.0)
24-
aws-sdk-kms (1.42.0)
24+
aws-sdk-kms (1.43.0)
2525
aws-sdk-core (~> 3, >= 3.112.0)
2626
aws-sigv4 (~> 1.1)
27-
aws-sdk-s3 (1.89.0)
27+
aws-sdk-s3 (1.93.0)
2828
aws-sdk-core (~> 3, >= 3.112.0)
2929
aws-sdk-kms (~> 1)
3030
aws-sigv4 (~> 1.1)
31-
aws-sigv4 (1.2.2)
31+
aws-sigv4 (1.2.3)
3232
aws-eventstream (~> 1, >= 1.0.2)
3333
babosa (1.0.4)
3434
capistrano (3.4.0)
@@ -97,7 +97,7 @@ GEM
9797
faraday_middleware (1.0.0)
9898
faraday (~> 1.0)
9999
fastimage (2.2.3)
100-
fastlane (2.176.0)
100+
fastlane (2.179.0)
101101
CFPropertyList (>= 2.3, < 4.0.0)
102102
addressable (>= 2.3, < 3.0.0)
103103
artifactory (~> 3.0)
@@ -146,7 +146,7 @@ GEM
146146
representable (~> 3.0)
147147
retriable (>= 2.0, < 4.0)
148148
signet (~> 0.12)
149-
google-apis-core (0.2.1)
149+
google-apis-core (0.3.0)
150150
addressable (~> 2.5, >= 2.5.1)
151151
googleauth (~> 0.14)
152152
httpclient (>= 2.8.1, < 3.0)
@@ -156,25 +156,25 @@ GEM
156156
rexml
157157
signet (~> 0.14)
158158
webrick
159-
google-apis-iamcredentials_v1 (0.1.0)
159+
google-apis-iamcredentials_v1 (0.2.0)
160160
google-apis-core (~> 0.1)
161-
google-apis-storage_v1 (0.2.0)
161+
google-apis-storage_v1 (0.3.0)
162162
google-apis-core (~> 0.1)
163-
google-cloud-core (1.5.0)
163+
google-cloud-core (1.6.0)
164164
google-cloud-env (~> 1.0)
165165
google-cloud-errors (~> 1.0)
166-
google-cloud-env (1.4.0)
166+
google-cloud-env (1.5.0)
167167
faraday (>= 0.17.3, < 2.0)
168-
google-cloud-errors (1.0.1)
169-
google-cloud-storage (1.30.0)
168+
google-cloud-errors (1.1.0)
169+
google-cloud-storage (1.31.0)
170170
addressable (~> 2.5)
171171
digest-crc (~> 0.4)
172172
google-apis-iamcredentials_v1 (~> 0.1)
173173
google-apis-storage_v1 (~> 0.1)
174174
google-cloud-core (~> 1.2)
175175
googleauth (~> 0.9)
176176
mini_mime (~> 1.0)
177-
googleauth (0.15.1)
177+
googleauth (0.16.0)
178178
faraday (>= 0.17.3, < 2.0)
179179
jwt (>= 1.4, < 3.0)
180180
memoist (~> 0.16)
@@ -192,7 +192,7 @@ GEM
192192
jwt (2.2.2)
193193
memoist (0.16.2)
194194
mini_magick (4.11.0)
195-
mini_mime (1.0.2)
195+
mini_mime (1.0.3)
196196
mini_portile2 (2.4.0)
197197
minitest (5.14.2)
198198
molinillo (0.6.6)
@@ -222,7 +222,7 @@ GEM
222222
ruby2_keywords (0.0.4)
223223
rubyzip (2.3.0)
224224
security (0.1.3)
225-
signet (0.14.1)
225+
signet (0.15.0)
226226
addressable (~> 2.3)
227227
faraday (>= 0.17.3, < 2.0)
228228
jwt (>= 1.5, < 3.0)

app/controllers/items/detail.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,24 @@ export default GoodcityController.extend(
386386
}, ERROR_STRATEGIES.MODAL);
387387
},
388388

389+
itemValueHkDollar: Ember.computed(
390+
"item",
391+
"valueHkDollar",
392+
"item.isBoxOrPallet",
393+
function() {
394+
if (this.get("item.isBoxOrPallet")) {
395+
return false;
396+
}
397+
398+
return this.get("valueHkDollar");
399+
}
400+
),
401+
402+
isInvalidValuation: Ember.computed("itemValueHkDollar", function() {
403+
const value = this.get("itemValueHkDollar");
404+
return value === "" || value === null;
405+
}),
406+
389407
actions: {
390408
updatePackage(field, value) {
391409
this.runTask(

app/controllers/users/details.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import OrganisationMixin from "stock/mixins/organisation";
66
export default Ember.Controller.extend(OrganisationMixin, AsyncMixin, {
77
organisationsUserService: Ember.inject.service(),
88
userService: Ember.inject.service(),
9-
9+
session: Ember.inject.service(),
1010
user: Ember.computed.alias("model"),
1111
disableUserPopupVisible: false,
1212
enableUserPopupVisible: false,
@@ -25,6 +25,12 @@ export default Ember.Controller.extend(OrganisationMixin, AsyncMixin, {
2525
"isDisabledUser"
2626
),
2727

28+
canManageCharityPosition: Ember.computed(function() {
29+
return this.get("session")
30+
.get("currentUser")
31+
.get("canManageOrganisationsUsers");
32+
}),
33+
2834
userOrganisationDetails: Ember.computed(
2935
"model",
3036
"model.organisationsUsers.[]",

app/models/user_profile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ export default Addressable.extend({
9898
);
9999
}),
100100

101+
canManageOrganisationsUsers: Ember.computed("roles", function() {
102+
const roles = this.get("roles");
103+
return roles.find(
104+
r =>
105+
r.get("permissionNames").indexOf("can_manage_organisations_users") >= 0
106+
);
107+
}),
108+
101109
canDisableUsers: Ember.computed("roles", function() {
102110
const roles = this.get("roles");
103111
return roles.find(

app/routes/orders/detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default AuthorizeRoute.extend({
66
currentRouteName: null,
77

88
model({ order_id }) {
9-
return this.loadIfAbsent("designation", order_id);
9+
return this.get("store").findRecord("designation", order_id);
1010
},
1111

1212
async afterModel() {

app/routes/orders/order_types.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ export default detail.extend({
1010
loadLookups() {
1111
// Load dependent lookup tables
1212
return Ember.RSVP.all(
13-
[
14-
"district",
15-
"gogovan_transport",
16-
"booking_type",
17-
"process_checklist"
18-
].map(model =>
13+
["gogovan_transport", "booking_type", "process_checklist"].map(model =>
1914
!this.store.peekAll(model).get("length")
2015
? this.store.findAll(model)
2116
: this.store.peekAll(model)

app/styles/templates/items/_detail.scss

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,25 +745,29 @@
745745
}
746746

747747
.donation-input-error,
748-
.description-error {
748+
.item-input-error {
749749
padding-left: 0.2rem;
750750
color: white;
751751
margin-left: -0.2rem;
752752
margin-top: -1rem;
753753
background-color: #f46769;
754754
width: 100%;
755-
756755
}
757756

758757
.description-error {
759-
margin: -1.3rem 0 0.4rem 0.1rem!important;
760-
width: 100% !important;
758+
margin: -1.3rem 0 1rem 0.1rem!important;
759+
width: 99% !important;
761760
display: block !important;
762761
}
763762

763+
.item-hk-value-error {
764+
margin: -1rem 0 1rem 0rem !important;
765+
padding: 0 0.2rem;
766+
width: 65%;
764767

765-
.form__control.form__control--error .description-error {
766-
display: block !important;
768+
@media #{$small-only} {
769+
width: 90%;
770+
}
767771
}
768772

769773
.numeric-input,
@@ -1054,6 +1058,7 @@
10541058
font-size: 1rem !important;
10551059
padding: 0.5rem !important;
10561060
display: inline-block !important;
1061+
10571062
@media #{$small-only} {
10581063
width: 90% !important;
10591064
font-size: 0.7rem !important;

app/styles/templates/orders/_detail.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@
288288
color: rgba(0, 0, 0, 0.75);
289289
}
290290
}
291+
292+
.reschedule-popup .picker__frame {
293+
height: 100vh;
294+
}
291295
}
292296

293297
.order_item_list_tabs{

app/templates/items/detail/tabs/_item_detail.hbs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
data-autoresize=true value=item.notesZhTw class="description-textarea-withbg" pattern=".*\S.*"}}
5454
{{/if}}
5555
{{#unless item.notes}}
56-
<div class='description-error'>
56+
<div class='description-error item-input-error'>
5757
{{t 'item_details.validation_errors.description'}}
5858
</div>
5959
{{/unless}}
@@ -101,17 +101,24 @@
101101
</div>
102102
<div class="row">
103103
<div class="columns large-3 small-3">{{t 'items.value'}} </div>
104-
<div class="columns large-3 small-3 ">
104+
<div class="columns large-5 small-5 ">
105105
{{numeric-inline-input
106106
name="value_hk_dollar"
107107
value=valueHkDollar
108-
maxlength="6"
108+
maxlength="10"
109109
acceptFloat=true
110110
class='numeric-input valuation-input'
111111
onSettingInput=(action 'updatePackage')
112112
}}
113+
114+
{{#if isInvalidValuation}}
115+
<div class='item-hk-value-error item-input-error'>
116+
{{t 'items.new.validation_errors.blank_valuation'}}
117+
</div>
118+
{{/if}}
113119
</div>
114-
<div class="columns large-6 small-6">
120+
121+
<div class="columns large-4 small-4">
115122
{{#if (is-not-equal valueHkDollar defaultValueHkDollar)}}
116123
<span {{action "applyDefaultItemValuation"}} class="default-content">
117124
{{t "items.apply_default"}} {{defaultValueHkDollar}}

app/templates/items/new.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<div class="option_menu" {{action "openImageOverlay"}}>
119119
{{t "camera.take"}}
120120
</div>
121-
{{/unless}}
121+
{{/unless}}
122122
</div>
123123
{{/dropDown.dropDownBody}}
124124
{{/composable-drop-down}}
@@ -158,11 +158,11 @@
158158
<div class="small-3 columns">
159159
{{t "items.value"}}
160160
</div>
161-
<div class="columns small-3">
162-
{{numeric-input acceptFloat=true required='true' acceptZeroValue=true value=valueHkDollar name="value_hk" maxlength="6"
161+
<div class="columns small-4">
162+
{{numeric-input acceptFloat=true required='true' acceptZeroValue=true value=valueHkDollar name="value_hk" maxlength="10"
163163
pattern="\d+\.?\d*"}}
164164
</div>
165-
<div class="columns small-6 apply-default">
165+
<div class="columns small-5 apply-default">
166166
{{#if canApplyDefaultValuation}}
167167
<a href="#" {{action 'setDefaultItemValuation'}} class="default-content">{{t 'items.apply_default'}}
168168
{{defaultValueHkDollar}}</a>

0 commit comments

Comments
 (0)