mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-03 22:13:18 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			759 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			759 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<script>
 | 
						|
let mailgunComponent = {
 | 
						|
  template: '#mailgun-template'
 | 
						|
}
 | 
						|
 | 
						|
let sendgridComponent = {
 | 
						|
  template: '#sendgrid-template'
 | 
						|
}
 | 
						|
 | 
						|
let sparkPostComponent = {
 | 
						|
  template: '#sparkpost-template'
 | 
						|
}
 | 
						|
 | 
						|
let smtpComponent = {
 | 
						|
  template: '#smtp-template'
 | 
						|
}
 | 
						|
 | 
						|
export default {
 | 
						|
  components: {
 | 
						|
    mailgun: mailgunComponent,
 | 
						|
    sendgrid: sendgridComponent,
 | 
						|
    sparkpost: sparkPostComponent,
 | 
						|
    smtp: smtpComponent
 | 
						|
  },
 | 
						|
  props: {
 | 
						|
    view: {
 | 
						|
      type: Array,
 | 
						|
      require: true,
 | 
						|
      default: Array
 | 
						|
    }
 | 
						|
  },
 | 
						|
  data () {
 | 
						|
    return {
 | 
						|
      currentView: 'mailgun'
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted () {
 | 
						|
    let views = ['mailgun', 'sendgrid', 'sparkpost', 'smtp']
 | 
						|
 | 
						|
    if (this.view && views.indexOf(this.view) > -1) {
 | 
						|
      this.currentView = this.view
 | 
						|
    };
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 |