{return {'id': this.state.piece.id}; }}
label={getLangText('Personal note (private)')}
- defaultValue={this.state.piece.private_note ? this.state.piece.private_note : null}
+ defaultValue={this.state.piece.private_note || null}
placeholder={getLangText('Enter your comments ...')}
editable={true}
successMessage={getLangText('Private note saved')}
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
index 6ba8ca95..0f631758 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
@@ -12,6 +12,8 @@ import NotificationStore from '../../../../../stores/notification_store';
import UserActions from '../../../../../actions/user_actions';
import UserStore from '../../../../../stores/user_store';
+import OwnershipFetcher from '../../../../../fetchers/ownership_fetcher';
+
import WhitelabelStore from '../../../../../stores/whitelabel_store';
import WhitelabelActions from '../../../../../actions/whitelabel_actions';
@@ -21,9 +23,7 @@ import GlobalNotificationActions from '../../../../../actions/global_notificatio
import CopyrightAssociationForm from '../../../../ascribe_forms/form_copyright_association';
import AppConstants from '../../../../../constants/application_constants';
-import ApiUrls from '../../../../../constants/api_urls';
-import requests from '../../../../../utils/requests';
import { getLangText } from '../../../../../utils/lang_utils';
import { mergeOptions } from '../../../../../utils/general_utils';
@@ -110,7 +110,7 @@ let IkonotvContractNotifications = React.createClass({
handleConfirm() {
let contractAgreement = this.state.contractAgreementListNotifications[0].contract_agreement;
- requests.put(ApiUrls.ownership_contract_agreements_confirm, {contract_agreement_id: contractAgreement.id}).then(
+ OwnershipFetcher.confirmContractAgreement(contractAgreement).then(
() => this.handleConfirmSuccess()
);
},
@@ -123,7 +123,7 @@ let IkonotvContractNotifications = React.createClass({
handleDeny() {
let contractAgreement = this.state.contractAgreementListNotifications[0].contract_agreement;
- requests.put(ApiUrls.ownership_contract_agreements_deny, {contract_agreement_id: contractAgreement.id}).then(
+ OwnershipFetcher.denyContractAgreement(contractAgreement).then(
() => this.handleDenySuccess()
);
},
@@ -135,11 +135,9 @@ let IkonotvContractNotifications = React.createClass({
},
getCopyrightAssociationForm(){
- if (this.state.currentUser && this.state.currentUser.profile
- && this.state.currentUser.profile.copyright_association){
- return null;
- }
- if (this.state.currentUser && this.state.currentUser.profile) {
+ let c = this.state.currentUser;
+
+ if (c && c.profile && !c.profile.copyright_association) {
return (
{getLangText('Are you a member of any copyright societies?')}
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
index 7abfd62c..3fee2e50 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
@@ -31,7 +31,7 @@ let IkonotvLanding = React.createClass({
},
getEnterButton() {
- let redirect = 'signup';
+ let redirect = 'login';
if(this.state.currentUser && this.state.currentUser.email) {
redirect = 'pieces';
@@ -39,7 +39,6 @@ let IkonotvLanding = React.createClass({
else if (this.getQuery() && this.getQuery().redirect) {
redirect = this.getQuery().redirect;
}
- console.log(redirect);
return (
{getLangText('ENTER')}
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
index ecb594c5..700b5678 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
@@ -165,14 +165,8 @@ let IkonotvRegisterPiece = React.createClass({
},
canSubmit() {
- if (this.state.currentUser && this.state.currentUser.acl) {
- return (
- this.state.currentUser
- && this.state.currentUser.acl
- && !!this.state.currentUser.acl.acl_submit
- );
- }
- return false;
+ let c = this.state.currentUser;
+ return c && c.acl && c.acl.acl_submit;
},
getSlideArtistDetails() {
diff --git a/js/fetchers/ownership_fetcher.js b/js/fetchers/ownership_fetcher.js
index f9ce5f86..b0d88927 100644
--- a/js/fetchers/ownership_fetcher.js
+++ b/js/fetchers/ownership_fetcher.js
@@ -44,6 +44,14 @@ let OwnershipFetcher = {
return requests.get(ApiUrls.ownership_contract_agreements, queryParams);
},
+ confirmContractAgreement(contractAgreement){
+ return requests.put(ApiUrls.ownership_contract_agreements_confirm, {contract_agreement_id: contractAgreement.id});
+ },
+
+ denyContractAgreement(contractAgreement){
+ return requests.put(ApiUrls.ownership_contract_agreements_deny, {contract_agreement_id: contractAgreement.id});
+ },
+
fetchLoanPieceRequestList(){
return requests.get(ApiUrls.ownership_loans_pieces_request);
},