(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["feedback-TFeedback"],{8218:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TFeedback = function( _options ) {\n\t\tvar options = $.extend( {\n\t\t\tsource: '',\n\t\t\tforce_source: false, // does not prepend viewId to source value\n\t\t\tdelay: 0,\n\t\t\tmanual_trigger: false,\n\t\t\tprompt_for_feedback: false, // Default is false so that only manual trigger, custom functions, or server input will make the feedback popup appear.\n\t\t\treview_link: 'https://www.timetrex.com/r?id=review&product_edition_id=' + Global.getProductEdition()\n\t\t}, _options );\n\n\t\t// DOM references for containers and pages\n\t\tvar feedback_container = Global.loadWidgetByName( FormItemType.FEEDBACK_BOX ); // Note: There is a .feedback-overlay div at the root of feedback_container controlled by CSS.\n\t\tvar page_title = feedback_container.find( '.top-bar-title' );\n\t\tvar all_pages = feedback_container.find( '.feedback-page' );\n\t\tvar default_page = feedback_container.find( '.feedback-page.default' );\n\t\tvar positive_page = feedback_container.find( '.feedback-page.positive' );\n\t\tvar negative_page = feedback_container.find( '.feedback-page.negative' );\n\n\t\tvar api = TTAPI.APIUser;\n\n\t\tvar feedback = {\n\t\t\tPOSITIVE: 'postitive',\n\t\t\tNEUTRAL: 'neutral',\n\t\t\tNEGATIVE: 'negative'\n\t\t};\n\n\t\tfunction init() {\n\n\t\t\t// check the feedback prompt status set by API\n\t\t\tif ( LocalCacheData.getLoginUser() && LocalCacheData.getLoginUser().prompt_for_feedback == true ) {\n\t\t\t\toptions.prompt_for_feedback = true;\n\t\t\t\tLocalCacheData.getLoginUser().prompt_for_feedback = false;\n\t\t\t\t// TODO: API Call to save the new value\n\t\t\t}\n\n\t\t\tif ( options.prompt_for_feedback ) {\n\t\t\t\t// Append current view id to the source\n\t\t\t\tif ( !options.force_source ) {\n\t\t\t\t\toptions.source = LocalCacheData.current_open_view_id + '@' + options.source;\n\t\t\t\t}\n\n\t\t\t\t// Initialise the default page (not visible until showFeedbackContainer() is triggered.\n\t\t\t\tshowPage( 'default' );\n\n\t\t\t\t// Display feedback dialog either immediately or with a delay\n\t\t\t\tif ( options.delay && options.delay > 0 ) {\n\t\t\t\t\tdelayShowFeedbackContainer( options.delay );\n\t\t\t\t} else {\n\t\t\t\t\tshowFeedbackContainer();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction getFeedbackType() {\n\t\t\tif ( options.manual_trigger ) {\n\t\t\t\treturn 'click';\n\t\t\t} else {\n\t\t\t\treturn 'popup';\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t *\n\t\t * @param {number} duration - number of milliseconds to delay the feedback popup from showing.\n\t\t */\n\t\tfunction delayShowFeedbackContainer( duration ) {\n\t\t\tduration = duration || 0;\n\t\t\tDebug.Text( 'Setting feedback display delay to ' + duration, 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\tsetTimeout( function() {\n\t\t\t\tDebug.Text( 'Triggering delayed feedback display', 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\t\tshowFeedbackContainer();\n\t\t\t}, duration );\n\t\t}\n\n\t\tfunction showFeedbackContainer() {\n\t\t\tif ( $( '.feedback-container' ).length == 0 ) {\n\t\t\t\t$( 'body' ).append( feedback_container );\n\t\t\t} else {\n\t\t\t\tDebug.Text( 'ERROR: Feedback container already exists, halting to prevent duplicate popups.', 'TFeedback.js', 'TFeedback', 'initDefaultPage', 1 );\n\t\t\t}\n\t\t}\n\n\t\tfunction removeFeedbackContainer() {\n\t\t\tif ( Global.isSet( feedback_container ) ) {\n\t\t\t\tfeedback_container.remove();\n\t\t\t}\n\t\t}\n\n\t\tfunction initDefaultPage() {\n\t\t\tpage_title.html( $.i18n._( 'Feedback' ) );\n\t\t\tdefault_page.find( '.page-text' ).text( $.i18n._( 'Tell us what you think about TimeTrex?' ) );\n\n\t\t\tdefault_page.find( '.positive-button' )\n\t\t\t\t.html( $.i18n._( 'It\\'s great!' ) )\n\t\t\t\t.bind( 'click', function() {\n\t\t\t\t\tshowPage( 'positive' );\n\t\t\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: ' + getFeedbackType() + ', Label: ' + getFeedbackType() + ':feedback:' + options.source + ':' + feedback.POSITIVE, 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', getFeedbackType(), getFeedbackType() + ':feedback:' + options.source + ':' + feedback.POSITIVE );\n\t\t\t\t\tsendDataToFeedbackAPI( feedback.POSITIVE, '' );\n\t\t\t\t} );\n\n\t\t\tdefault_page.find( '.negative-button' )\n\t\t\t\t.html( $.i18n._( 'Not so great' ) )\n\t\t\t\t.bind( 'click', function() {\n\t\t\t\t\tshowPage( 'negative' );\n\t\t\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: ' + getFeedbackType() + ', Label: ' + getFeedbackType() + ':feedback:' + options.source + ':' + feedback.NEGATIVE, 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', getFeedbackType(), getFeedbackType() + ':feedback:' + options.source + ':' + feedback.NEGATIVE );\n\t\t\t\t\tsendDataToFeedbackAPI( feedback.NEGATIVE, '' );\n\t\t\t\t} );\n\n\t\t\tvar cancel_text;\n\t\t\tif ( options.manual_trigger ) {\n\t\t\t\tcancel_text = $.i18n._( 'Close' );\n\t\t\t} else {\n\t\t\t\tvar cancel_text = $.i18n._( 'Ask me later' );\n\t\t\t}\n\n\t\t\tdefault_page.find( '.cancel-button' )\n\t\t\t\t.html( cancel_text )\n\t\t\t\t.click( function() {\n\t\t\t\t\tremoveFeedbackContainer();\n\t\t\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: ' + getFeedbackType() + ', Label: ' + getFeedbackType() + ':feedback:' + options.source + ':' + feedback.NEUTRAL, 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', getFeedbackType(), getFeedbackType() + ':feedback:' + options.source + ':' + feedback.NEUTRAL );\n\t\t\t\t\tsendDataToFeedbackAPI( feedback.NEUTRAL, '' );\n\t\t\t\t} );\n\n\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: ' + getFeedbackType() + ', Label: ' + getFeedbackType() + ':feedback:' + options.source, 'TFeedback.js', 'TFeedback', 'initDefaultPage', 10 );\n\t\t\tGlobal.sendAnalyticsEvent( 'feedback', getFeedbackType(), getFeedbackType() + ':feedback:' + options.source );\n\t\t}\n\n\t\tfunction initPositivePage() {\n\t\t\tvar feedback_rating = feedback.POSITIVE;\n\t\t\tpage_title.html( $.i18n._( 'Feedback' ) );\n\t\t\tpositive_page.find( '.page-text.block1' ).text( $.i18n._( 'It thrills us to hear you think TimeTrex is great!' ) );\n\t\t\tpositive_page.find( '.page-text.block2' ).text( $.i18n._( 'Share your experience and WIN a tasty lunch for your team!' ) );\n\t\t\tpositive_page.find( '.page-text.block3' ).text( $.i18n._( 'We\\'ll select one winner each month.' ) );\n\t\t\tpositive_page.find( '.openReviewPageButton' )\n\t\t\t\t.html( $.i18n._( 'Share experience' ) )\n\t\t\t\t.bind( 'click', function() {\n\t\t\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: ' + getFeedbackType() + '-Link, Label: submit:feedback:' + options.source + ':' + feedback_rating, 'TFeedback.js', 'TFeedback', 'initPositivePage', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', getFeedbackType() + '-link', 'submit:' + getFeedbackType() + ':feedback:' + options.source + ':' + feedback_rating );\n\t\t\t\t\tsendDataToFeedbackAPI( feedback_rating, '', false );\n\t\t\t\t\ttriggerFeedbackReviewAPI( 1, true );\n\t\t\t\t\twindow.open( options.review_link, '_blank', 'review_link' );\n\t\t\t\t} );\n\t\t\tpositive_page.find( '.cancel-button' )\n\t\t\t\t.html( $.i18n._( 'I\\'m not hungry' ) ) //Skip the Lunch\n\t\t\t\t.click( function() {\n\t\t\t\t\ttriggerFeedbackReviewAPI( 0, true );\n\t\t\t\t\tDebug.Text( 'Feedback: Category: feedback, Action: cancel, Label: cancel:feedback:' + options.source + ':' + feedback_rating, 'TFeedback.js', 'TFeedback', 'cancelButtonClick', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', 'cancel', 'cancel:feedback:' + options.source + ':' + feedback_rating );\n\t\t\t\t} );\n\t\t}\n\n\t\tfunction initNegativePage() {\n\t\t\tvar feedback_rating = feedback.NEGATIVE;\n\t\t\tvar user_contact = getUserContactDetails();\n\t\t\tvar form_messagebox = negative_page.find( '.feedback-messagebox' );\n\t\t\tvar form_email = negative_page.find( '.feedback-email' );\n\t\t\tvar form_phone = negative_page.find( '.feedback-phone' );\n\n\t\t\tpage_title.html( $.i18n._( 'Feedback' ) );\n\t\t\tnegative_page.find( '.page-text' ).html( $.i18n._( 'We\\'re all ears!
What improvements do you think we should make?' ) );\n\t\t\tnegative_page.find( '.contact-notice-text' ).html( $.i18n._( 'What is the best way to contact you?' ) );\n\t\t\tnegative_page.find( '.email-label-text' ).html( $.i18n._( 'Email' ) );\n\t\t\tnegative_page.find( '.phone-label-text' ).html( $.i18n._( 'Phone' ) );\n\t\t\tform_email.val( user_contact.user_email );\n\t\t\tform_phone.val( user_contact.user_phone );\n\n\t\t\tnegative_page.find( '.sendButton' )\n\t\t\t\t.html( $.i18n._( 'Send' ) )\n\t\t\t\t.click( _sendForm );\n\t\t\tnegative_page.find( '.cancel-button' )\n\t\t\t\t.html( $.i18n._( 'Back' ) )\n\t\t\t\t.click( function() {\n\t\t\t\t\tshowPage( 'default' );\n\t\t\t\t\tDebug.Text( 'Feedback: Category: feedback, Action: cancel, Label: cancel:feedback:' + options.source + ':' + feedback_rating, 'TFeedback.js', 'TFeedback', 'cancelButtonClick', 10 );\n\t\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', 'cancel', 'cancel:feedback:' + options.source + ':' + feedback_rating );\n\t\t\t\t} );\n\n\t\t\tfunction _sendForm() {\n\t\t\t\tvar message = '';\n\t\t\t\tif ( form_messagebox.val().length > 0 ) {\n\t\t\t\t\tmessage = form_messagebox.val() + '\\nEmail: ' + form_email.val() + '\\nPhone: ' + form_phone.val();\n\t\t\t\t}\n\t\t\t\tDebug.Text( 'Feedback Analytics: Category: feedback, Action: submit, Label: submit:feedback:' + options.source + ':' + feedback_rating, 'TFeedback.js', 'TFeedback', 'initNegativePage._sendForm', 10 );\n\t\t\t\tGlobal.sendAnalyticsEvent( 'feedback', 'submit', 'submit:feedback:' + options.source + ':' + feedback_rating );\n\n\t\t\t\tsendDataToFeedbackAPI( feedback_rating, message, true );\n\t\t\t}\n\t\t}\n\n\t\tfunction showPage( page ) {\n\t\t\t// Set i18n translation text and pre-populate any data fields for requested page, then load page.\n\t\t\tswitch ( page ) {\n\t\t\t\tcase 'positive':\n\t\t\t\t\tinitPositivePage();\n\t\t\t\t\tall_pages.hide();\n\t\t\t\t\tpositive_page.show();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'negative':\n\t\t\t\t\tinitNegativePage();\n\t\t\t\t\tall_pages.hide();\n\t\t\t\t\tnegative_page.show();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tinitDefaultPage();\n\t\t\t\t\tall_pages.hide();\n\t\t\t\t\tdefault_page.show();\n\t\t\t}\n\t\t}\n\n\t\tfunction getUserContactDetails() {\n\t\t\tvar current_user_api = TTAPI.APIAuthentication;\n\t\t\tvar user = current_user_api.getCurrentUser( { async: false } );\n\t\t\tuser = user.getResult();\n\t\t\tvar user_email;\n\t\t\tif ( user.work_email != false && user.work_email != '' ) {\n\t\t\t\tuser_email = user.work_email;\n\t\t\t} else if ( user.home_email != false ) {\n\t\t\t\tuser_email = user.home_email;\n\t\t\t}\n\t\t\tvar user_phone;\n\t\t\tif ( user.work_phone != false && user.work_phone != '' ) {\n\t\t\t\tuser_phone = user.work_phone;\n\t\t\t} else if ( user.home_phone != false ) {\n\t\t\t\tuser_phone = user.home_phone;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tuser_email: user_email,\n\t\t\t\tuser_phone: user_phone\n\t\t\t};\n\t\t}\n\n\t\tfunction sendDataToFeedbackAPI( feedback_rating, message, close_window ) {\n\t\t\tif ( options.source ) {\n\t\t\t\tmessage += '\\n\\nFeedback source: ' + options.source;\n\t\t\t}\n\n\t\t\tapi.setUserFeedbackRating( feedback_rating, message, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\tif ( close_window ) {\n\t\t\t\t\t\t\tremoveFeedbackContainer();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tfunction triggerFeedbackReviewAPI( review_state, close_window ) {\n\t\t\tapi.setUserFeedbackReview( review_state, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\tif ( close_window ) {\n\t\t\t\t\t\t\tremoveFeedbackContainer();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// this.each is typical jQuery format to apply the actions to all elements in the jQuery selector. In this case, not needed as we attach manually to the body tag, and won't work on empty selectors.\n\t\t// this.each( function() {\n\t\t// \tinit();\n\t\t// } );\n\n\t\tinit();\n\n\t\treturn this;\n\t};\n\n\t$.fn.TFeedback.html_template = `\n\t
\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n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